diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 553a8b521ea..7dd0c799f0e 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -196,10 +196,26 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3 - # Build once, load into the local daemon for smoke testing. Cached - # to gha with a per-arch scope; the push step below reuses every - # layer from this build. - - name: Build image (arm64, smoke test) + # Build once, load into the local daemon for smoke testing. PR arm64 + # builds deliberately avoid the gha cache: cold-cache arm64 builds can + # outlive GitHub's short-lived Azure cache SAS token, then fail while + # reading or writing cache blobs before the smoke test can run. + - name: Build image (arm64, smoke test, uncached PR) + if: github.event_name == 'pull_request' + uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f # v7.1.0 + with: + context: . + file: Dockerfile + load: true + platforms: linux/arm64 + tags: ${{ env.IMAGE_NAME }}:test + build-args: | + HERMES_GIT_SHA=${{ github.sha }} + + # Main/release builds still use the per-arch gha cache so the digest + # push below can reuse layers from this smoke-test build. + - name: Build image (arm64, smoke test, cached publish) + if: github.event_name != 'pull_request' uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f # v7.1.0 with: context: .