Skip to content

Commit

Permalink
Do not pass empty AWS keys to sccache in PR builds
Browse files Browse the repository at this point in the history
  • Loading branch information
Kobzol committed Feb 14, 2025
1 parent 5789fc0 commit 0d0a2a3
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/ci/docker/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -236,9 +236,15 @@ args=
if [ "$SCCACHE_BUCKET" != "" ]; then
args="$args --env SCCACHE_BUCKET"
args="$args --env SCCACHE_REGION"
args="$args --env AWS_ACCESS_KEY_ID"
args="$args --env AWS_SECRET_ACCESS_KEY"
args="$args --env AWS_REGION"

# Disable S3 authentication for PR builds, because the access keys are missing
if [ "$PR_CI_JOB" != "" ]; then
args="$args --env SCCACHE_S3_NO_CREDENTIALS=1"
else
args="$args --env AWS_ACCESS_KEY_ID"
args="$args --env AWS_SECRET_ACCESS_KEY"
fi
else
mkdir -p $HOME/.cache/sccache
args="$args --env SCCACHE_DIR=/sccache --volume $HOME/.cache/sccache:/sccache"
Expand Down

0 comments on commit 0d0a2a3

Please sign in to comment.