1010
1111permissions :
1212 contents : read
13+ id-token : write
1314 pull-requests : read
1415
1516env :
2728 labels : dind-large
2829 group : dm2
2930 container : &container-setup
30- image : ghcr.io/dfinity/ic-build@sha256:18d23aef1f5e9e7e1eef94c32563f8ed15531ae79065bb00bb5206a643fc49fe
31+ image : ghcr.io/dfinity/ic-build@sha256:0a0cff0b12c7586c2f312c739176924edf0c9e71df92f382eba836913da9f1c6
3132 options : >-
3233 -e NODE_NAME --privileged --cgroupns host --mount type=tmpfs,target="/tmp/containers"
3334 timeout-minutes : 90
@@ -38,14 +39,31 @@ jobs:
3839 with :
3940 fetch-depth : ${{ github.event_name == 'pull_request' && 256 || 0 }}
4041 ref : ${{ inputs.commit-sha }}
42+ - name : Filter fuzzer related files
43+ uses : dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3
44+ if : github.event_name == 'pull_request'
45+ id : filter
46+ with :
47+ ref : ${{ inputs.commit-sha }}
48+ filters : |
49+ fuzzers:
50+ - ".github/workflows/ci-main.yml"
51+ - "ci/container/TAG"
52+ - "bin/fuzzing/*.sh"
53+ - "**/BUILD.bazel"
54+ - "**/*.bzl"
55+ - "**/*.rs"
4156 - uses : ./.github/actions/netrc
57+ if : github.event_name != 'pull_request' || steps.filter.outputs.fuzzers == 'true'
4258 - name : Run Libfuzzer targets
4359 uses : ./.github/actions/bazel
60+ if : github.event_name != 'pull_request' || steps.filter.outputs.fuzzers == 'true'
4461 with :
4562 invocation-names : libfuzzer
4663 run : ./bin/fuzzing/run-all-fuzzers.sh --libfuzzer 100
4764 - name : Run AFL targets
4865 uses : ./.github/actions/bazel
66+ if : github.event_name != 'pull_request' || steps.filter.outputs.fuzzers == 'true'
4967 with :
5068 invocation-names : afl
5169 run : ./bin/fuzzing/run-all-fuzzers.sh --afl 10
6684
6785 # List of "protected" branches, i.e. branches (not necessarily "protected" in the GitHub sense) where we need
6886 # the full build to occur (including versioning)
69- protected_branches=("^master$" "^rc--" "^hotfix-" "^master-private$ ")
87+ protected_branches=("^master$" "^rc--" "^hotfix-" "^public-hotfix- ")
7088 for pattern in "${protected_branches[@]}"; do
7189 if [[ "$BRANCH_NAME" =~ $pattern ]]; then
7290 is_protected_branch="true"
@@ -123,7 +141,6 @@ jobs:
123141 skip_buf_checks="false"
124142 fi
125143
126-
127144 echo "| config | value |" >> "$GITHUB_STEP_SUMMARY"
128145 echo "| --- | --- |" >> "$GITHUB_STEP_SUMMARY"
129146
@@ -187,7 +204,7 @@ jobs:
187204 )
188205 if [[ "$CI_EVENT_NAME" == 'merge_group' ]]; then
189206 bazel_args+=( --test_timeout_filters=short,moderate --flaky_test_attempts=3 )
190- elif [[ $BRANCH_NAME =~ ^hotfix-.* ]]; then
207+ elif [[ $BRANCH_NAME =~ ^( hotfix-|public-hotfix-) ]]; then
191208 bazel_args+=( --test_timeout_filters=short,moderate )
192209 else
193210 bazel_args+=( --keep_going )
@@ -249,12 +266,18 @@ jobs:
249266 bazel_do build
250267 bazel_do test
251268
269+ - name : Configure AWS credentials
270+ uses : aws-actions/configure-aws-credentials@61815dcd50bd041e203e49132bacad1fd04d2708 # v5.1.1
271+ if : needs.config.outputs.release-build == 'true'
272+ with :
273+ role-session-name : " GitHub-Actions_ic_upload-artifacts"
274+ role-to-assume : ${{ vars.AWS_ASSUME_ROLE }}
275+ aws-region : eu-central-1
276+
252277 - name : Upload artifacts
253278 uses : ./.github/actions/upload-artifacts
254279 if : needs.config.outputs.release-build == 'true'
255280 env :
256- AWS_AWS_ACCESS_KEY_ID : ${{ secrets.AWS_AWS_ACCESS_KEY_ID }}
257- AWS_AWS_SECRET_ACCESS_KEY : ${{ secrets.AWS_AWS_SECRET_ACCESS_KEY }}
258281 CF_AWS_ACCESS_KEY_ID : ${{ secrets.CF_AWS_ACCESS_KEY_ID }}
259282 CF_AWS_SECRET_ACCESS_KEY : ${{ secrets.CF_AWS_SECRET_ACCESS_KEY }}
260283 with :
@@ -314,13 +337,19 @@ jobs:
314337 --test_tag_filters=test_all_platforms \
315338 //...
316339
340+ - name : Configure AWS credentials
341+ uses : aws-actions/configure-aws-credentials@61815dcd50bd041e203e49132bacad1fd04d2708 # v5.1.1
342+ if : needs.config.outputs.release-build == 'true'
343+ with :
344+ role-session-name : " GitHub-Actions_ic_upload-artifacts"
345+ role-to-assume : ${{ vars.AWS_ASSUME_ROLE }}
346+ aws-region : eu-central-1
347+
317348 - name : Upload artifacts
318349 # NOTE: GHA output quirk, 'true' is a string
319350 if : ${{ needs.config.outputs.full_macos_build == 'true' && needs.config.outputs.release-build == 'true' }}
320351 uses : ./.github/actions/upload-artifacts
321352 env :
322- AWS_AWS_ACCESS_KEY_ID : ${{ secrets.AWS_AWS_ACCESS_KEY_ID }}
323- AWS_AWS_SECRET_ACCESS_KEY : ${{ secrets.AWS_AWS_SECRET_ACCESS_KEY }}
324353 CF_AWS_ACCESS_KEY_ID : ${{ secrets.CF_AWS_ACCESS_KEY_ID }}
325354 CF_AWS_SECRET_ACCESS_KEY : ${{ secrets.CF_AWS_SECRET_ACCESS_KEY }}
326355 with :
@@ -452,11 +481,16 @@ jobs:
452481
453482 echo bundledir="$bundledir" >> "$GITHUB_OUTPUT"
454483
484+ - name : Configure AWS credentials
485+ uses : aws-actions/configure-aws-credentials@61815dcd50bd041e203e49132bacad1fd04d2708 # v5.1.1
486+ with :
487+ role-session-name : " GitHub-Actions_ic_upload-artifacts"
488+ role-to-assume : ${{ vars.AWS_ASSUME_ROLE }}
489+ aws-region : eu-central-1
490+
455491 - name : Upload artifacts
456492 uses : ./.github/actions/upload-artifacts
457493 env :
458- AWS_AWS_ACCESS_KEY_ID : ${{ secrets.AWS_AWS_ACCESS_KEY_ID }}
459- AWS_AWS_SECRET_ACCESS_KEY : ${{ secrets.AWS_AWS_SECRET_ACCESS_KEY }}
460494 CF_AWS_ACCESS_KEY_ID : ${{ secrets.CF_AWS_ACCESS_KEY_ID }}
461495 CF_AWS_SECRET_ACCESS_KEY : ${{ secrets.CF_AWS_SECRET_ACCESS_KEY }}
462496 with :
@@ -670,7 +704,8 @@ jobs:
670704 contains(github.event.pull_request.labels.*.name, 'CI_RUN_CARGO_JOBS') ||
671705 env.BRANCH_NAME == 'master' ||
672706 startsWith(env.BRANCH_NAME, 'rc--') ||
673- startsWith(env.BRANCH_NAME, 'hotfix-')
707+ startsWith(env.BRANCH_NAME, 'hotfix-') ||
708+ startsWith(env.BRANCH_NAME, 'public-hotfix-')
674709 shell : bash
675710 run : |
676711 set -eExuo pipefail
@@ -732,6 +767,7 @@ jobs:
732767 steps.filter.outputs.container-run == 'true' ||
733768 env.BRANCH_NAME == 'master' ||
734769 startsWith(env.BRANCH_NAME, 'rc--') ||
735- startsWith(env.BRANCH_NAME, 'hotfix-')
770+ startsWith(env.BRANCH_NAME, 'hotfix-') ||
771+ startsWith(env.BRANCH_NAME, 'public-hotfix-')
736772 run : |
737773 ./ci/container/container-run.sh ${{ matrix.command }}
0 commit comments