File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -68,15 +68,22 @@ jobs:
6868 - name : Verify per-arch binaries
6969 run : |
7070 set -euo pipefail
71- image="$(echo "$IMAGE_NAME" | tr '[:upper:]' '[:lower:]')@${{ steps.push.outputs.digest }}"
71+ repo="$(echo "$IMAGE_NAME" | tr '[:upper:]' '[:lower:]')"
72+ index="$repo@${{ steps.push.outputs.digest }}"
7273 for arch in amd64 arm64; do
7374 case "$arch" in
7475 amd64) want="x86-64" ;;
7576 arm64) want="aarch64" ;;
7677 esac
77- docker pull --platform "linux/$arch" "$image" >/dev/null
78+ # Pull each variant by its own manifest digest. Pulling the shared
79+ # index digest with --platform binds repo@digest to one platform,
80+ # so the second arch fails with "cannot overwrite digest".
81+ digest="$(docker buildx imagetools inspect --raw "$index" \
82+ | jq -r --arg arch "$arch" '.manifests[] | select(.platform.os == "linux" and .platform.architecture == $arch) | .digest')"
83+ test -n "$digest" || { echo "::error::pushed index has no linux/$arch manifest"; exit 1; }
84+ docker pull "$repo@$digest" >/dev/null
7885 docker rm -f "verify-$arch" >/dev/null 2>&1 || true
79- docker create --platform "linux/$arch" -- name "verify-$arch" "$image " >/dev/null
86+ docker create --name "verify-$arch" "$repo@$digest " >/dev/null
8087 docker cp "verify-$arch:/usr/local/bin/liveagent-gateway" "/tmp/gateway-$arch"
8188 docker rm -f "verify-$arch" >/dev/null
8289 info="$(file -b "/tmp/gateway-$arch")"
You can’t perform that action at this time.
0 commit comments