Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
af8e8a37e5 | ||
|
|
6bf0b3d0d7 | ||
|
|
c7a2d9f275 | ||
|
|
2ad7249d9f |
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,23 @@ 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
|
||||
docker buildx version
|
||||
rc=0; out=$(docker buildx imagetools inspect "$REPO:$TAG" --format '{{.Manifest.Digest}}' 2>&1) || rc=$?
|
||||
echo "diag: inspect rc=$rc out=$(printf '%s' "$out" | head -c 400)"
|
||||
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