Skip to content

Commit c68a5ef

Browse files
authored
chore(ci): turn on S3 caching for all PRs (#8898)
1 parent 38b485e commit c68a5ef

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

scripts/earthly-ci

+1-8
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,6 @@ function wipe_non_cache_docker_state {
3535
EARTHLY_RUN_STATS_JSON="earthly-run-stats.json"
3636
# Run earthly with our necesary secrets initialized
3737
# AWS credentials can be blank, however we will not use the S3 cache at all if so.
38-
if [ "$(git rev-parse --abbrev-ref HEAD)" = master ] || [ "$(git rev-parse --abbrev-ref HEAD)" = *build-cache* ] ; then
39-
# We upload to S3 on master. Meant for CI on master.
40-
S3_BUILD_CACHE_UPLOAD=true
41-
else
42-
# Don't upload to S3 on pull request branches (for now, at least)
43-
S3_BUILD_CACHE_UPLOAD=false
44-
fi
4538

4639
EARTHLY_ARGS=""
4740

@@ -52,7 +45,7 @@ function run_earthly() {
5245
--secret AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID:-} \
5346
--secret AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY:-} \
5447
--secret S3_BUILD_CACHE_MINIO_URL="" \
55-
--secret S3_BUILD_CACHE_UPLOAD="$S3_BUILD_CACHE_UPLOAD" \
48+
--secret S3_BUILD_CACHE_UPLOAD="true" \
5649
--secret S3_BUILD_CACHE_DOWNLOAD="true" \
5750
--secret AZTEC_BOT_COMMENTER_GITHUB_TOKEN=${AZTEC_BOT_GITHUB_TOKEN:-} \
5851
$EARTHLY_ARGS \

0 commit comments

Comments
 (0)