Merge pull request #50: arm64-attach plan after buildx [skip ci]
[skip ci] Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0185ukXi4YX5FxJGqhi6qab6
This commit was merged in pull request #50.
This commit is contained in:
commit
6bf0b3d0d7
2 files changed
+15
-15
No files matched your search
@@ -75,20 +75,6 @@ jobs:
|
|||||||
username: ${{ secrets.CI_USER }}
|
username: ${{ secrets.CI_USER }}
|
||||||
password: ${{ secrets.CI_TOKEN }}
|
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)
|
- name: Resolve base image digest (Docker Hub, direct)
|
||||||
id: base
|
id: base
|
||||||
env:
|
env:
|
||||||
@@ -136,6 +122,20 @@ jobs:
|
|||||||
if: steps.pkgcache.outputs.mirror == ''
|
if: steps.pkgcache.outputs.mirror == ''
|
||||||
uses: docker/setup-buildx-action@v3
|
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
|
- name: Cache-bust value
|
||||||
id: bust
|
id: bust
|
||||||
env:
|
env:
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ it() { $IMAGETOOLS "$1" "${bflag[@]}" "${@:2}"; }
|
|||||||
|
|
||||||
# tag_digest <ref>: manifest (index) digest of a ref; empty on failure.
|
# tag_digest <ref>: manifest (index) digest of a ref; empty on failure.
|
||||||
tag_digest() {
|
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 <ref>: image config architecture; empty on failure.
|
||||||
arch_of() {
|
arch_of() {
|
||||||
|
|||||||
Reference in new issue
Block a user