arm64-attach: run the plan step after Buildx setup (imagetools needs the plugin); show inspect errors
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0185ukXi4YX5FxJGqhi6qab6
This commit is contained in:
1 parent
2ad7249d9f
commit
c7a2d9f275
2 files changed
+15
-15
No files matched your search
@@ -75,20 +75,6 @@ jobs:
|
||||
username: ${{ secrets.CI_USER }}
|
||||
password: ${{ secrets.CI_TOKEN }}
|
||||
|
||||
# Cheap pre-check BEFORE the 10-20 minute build: tag exists, has exactly one amd64 entry,
|
||||
# and has no arm64 entry yet (exit 3 otherwise). Writes nothing. The index digest read here
|
||||
# is handed to the final step, which refuses if the tag moved in between.
|
||||
- name: Plan (read the tag, no writes)
|
||||
id: plan
|
||||
env:
|
||||
REPO: ${{ steps.v.outputs.repo }}
|
||||
TAG: ${{ steps.v.outputs.tag }}
|
||||
FORCE: ${{ steps.v.outputs.force }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
f=(); [ "$FORCE" = true ] && f=(--force)
|
||||
scripts/attach-arm64-index.sh --repo "$REPO" --tag "$TAG" --plan-only "${f[@]}"
|
||||
|
||||
- name: Resolve base image digest (Docker Hub, direct)
|
||||
id: base
|
||||
env:
|
||||
@@ -136,6 +122,20 @@ jobs:
|
||||
if: steps.pkgcache.outputs.mirror == ''
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
# (needs the buildx plugin, hence after the Buildx setup) Cheap pre-check BEFORE the long build: tag exists, has exactly one amd64 entry,
|
||||
# and has no arm64 entry yet (exit 3 otherwise). Writes nothing. The index digest read here
|
||||
# is handed to the final step, which refuses if the tag moved in between.
|
||||
- name: Plan (read the tag, no writes)
|
||||
id: plan
|
||||
env:
|
||||
REPO: ${{ steps.v.outputs.repo }}
|
||||
TAG: ${{ steps.v.outputs.tag }}
|
||||
FORCE: ${{ steps.v.outputs.force }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
f=(); [ "$FORCE" = true ] && f=(--force)
|
||||
scripts/attach-arm64-index.sh --repo "$REPO" --tag "$TAG" --plan-only "${f[@]}"
|
||||
|
||||
- name: Cache-bust value
|
||||
id: bust
|
||||
env:
|
||||
|
||||
@@ -75,7 +75,7 @@ it() { $IMAGETOOLS "$1" "${bflag[@]}" "${@:2}"; }
|
||||
|
||||
# tag_digest <ref>: manifest (index) digest of a ref; empty on failure.
|
||||
tag_digest() {
|
||||
it inspect "$1" --format '{{.Manifest.Digest}}' 2>/dev/null | tail -n 1 | tr -d '[:space:]' || true
|
||||
it inspect "$1" --format '{{.Manifest.Digest}}' 2>>"${ATTACH_STDERR:-/dev/stderr}" | tail -n 1 | tr -d '[:space:]' || true
|
||||
}
|
||||
# arch_of <ref>: image config architecture; empty on failure.
|
||||
arch_of() {
|
||||
|
||||
Reference in new issue
Block a user