@@ -21,14 +21,16 @@ concurrency:
2121jobs :
2222 check-skip :
2323 name : Check skip conditions
24- runs-on : ${{ vars.RUNNER_AMD64 || 'ubuntu-24.04' }}
24+ # Keep the bootstrap job cheap; RUNNER_CHECK_SKIP can point to a small Blacksmith ARM runner.
25+ runs-on : ${{ vars.RUNNER_CHECK_SKIP || 'ubuntu-24.04-arm' }}
2526 outputs :
2627 skip : ${{ steps.skip-check.outputs.skip }}
2728 runner-amd64 : ${{ steps.select-runner.outputs.runner_amd64 }}
2829 runner-arm64 : ${{ steps.select-runner.outputs.runner_arm64 }}
2930 use-blacksmith : ${{ steps.select-runner.outputs.use_blacksmith }}
3031 backlog-count : ${{ steps.select-runner.outputs.backlog_count }}
3132 decision-reason : ${{ steps.select-runner.outputs.decision_reason }}
33+ base-image-digest : ${{ steps.base-image.outputs.digest }}
3234 steps :
3335 - name : Check skip environment variables
3436 id : skip-check
5860 run : |
5961 python3 .github/workflows/select_dynamic_runner.py
6062
63+ - name : Get base image digest
64+ id : base-image
65+ if : ${{ steps.skip-check.outputs.skip == 'false' }}
66+ run : |
67+ # Fetch the canonical manifest digest for ubuntu:noble so the
68+ # depends cache key changes when Canonical pushes base image
69+ # updates (which may bump compiler versions).
70+ # Falls back to "unknown" on failure so CI is not blocked.
71+ TOKEN="$(curl -fsSL --max-time 10 \
72+ 'https://auth.docker.io/token?service=registry.docker.io&scope=repository:library/ubuntu:pull' \
73+ | jq -r '.token')" || true
74+ if [ -n "$TOKEN" ] && [ "$TOKEN" != "null" ]; then
75+ DIGEST="$(curl -fsSL --max-time 10 \
76+ -H "Authorization: Bearer $TOKEN" \
77+ -H 'Accept: application/vnd.docker.distribution.manifest.list.v2+json' \
78+ 'https://registry-1.docker.io/v2/library/ubuntu/manifests/noble' \
79+ -o /dev/null -D - | grep -i docker-content-digest | awk '{print $2}' | tr -d '\r' | sed 's/^sha256://')" || true
80+ fi
81+ echo "digest=${DIGEST:-unknown}" >> "$GITHUB_OUTPUT"
82+
6183 cache-sources :
6284 name : Cache depends sources
6385 needs : [check-skip]
98120 with :
99121 build-target : aarch64-linux
100122 container-path : ${{ needs.container.outputs.path }}
123+ base-image-digest : ${{ needs.check-skip.outputs.base-image-digest }}
101124 runs-on : ${{ needs.check-skip.outputs['runner-amd64'] }}
102125
103126 depends-linux64 :
@@ -112,6 +135,7 @@ jobs:
112135 with :
113136 build-target : linux64
114137 container-path : ${{ needs.container.outputs.path }}
138+ base-image-digest : ${{ needs.check-skip.outputs.base-image-digest }}
115139 runs-on : ${{ needs.check-skip.outputs['runner-amd64'] }}
116140
117141 depends-linux64_multiprocess :
@@ -124,6 +148,7 @@ jobs:
124148 with :
125149 build-target : linux64_multiprocess
126150 container-path : ${{ needs.container.outputs.path }}
151+ base-image-digest : ${{ needs.check-skip.outputs.base-image-digest }}
127152 runs-on : ${{ needs.check-skip.outputs['runner-arm64'] }}
128153
129154 depends-linux64_nowallet :
@@ -134,6 +159,7 @@ jobs:
134159 with :
135160 build-target : linux64_nowallet
136161 container-path : ${{ needs.container.outputs.path }}
162+ base-image-digest : ${{ needs.check-skip.outputs.base-image-digest }}
137163 runs-on : ${{ needs.check-skip.outputs['runner-amd64'] }}
138164
139165 depends-mac :
@@ -144,6 +170,7 @@ jobs:
144170 with :
145171 build-target : mac
146172 container-path : ${{ needs.container.outputs.path }}
173+ base-image-digest : ${{ needs.check-skip.outputs.base-image-digest }}
147174 runs-on : ${{ needs.check-skip.outputs['runner-amd64'] }}
148175
149176 depends-win64 :
@@ -154,6 +181,7 @@ jobs:
154181 with :
155182 build-target : win64
156183 container-path : ${{ needs.container.outputs.path }}
184+ base-image-digest : ${{ needs.check-skip.outputs.base-image-digest }}
157185 runs-on : ${{ needs.check-skip.outputs['runner-amd64'] }}
158186
159187 lint :
0 commit comments