Skip to content

Commit 535d06a

Browse files
fix: read container manifest digests without broken pipes (#161)
1 parent bf8c365 commit 535d06a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

.github/workflows/container-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ jobs:
463463
--tag "$candidate" \
464464
"${references[@]}"
465465
466-
manifest_digest="$(docker buildx imagetools inspect "$candidate" | awk '/^Digest:/{print $2; exit}')"
466+
manifest_digest="$(docker buildx imagetools inspect --format '{{.Manifest.Digest}}' "$candidate")"
467467
if [[ ! "$manifest_digest" =~ ^sha256:[[:xdigit:]]{64}$ ]]; then
468468
echo 'The registry did not return a valid multiarchitecture image digest.' >&2
469469
exit 1
@@ -590,7 +590,7 @@ jobs:
590590
--tag "$IMAGE:latest" \
591591
"$IMAGE@$MANIFEST_DIGEST"
592592
593-
actual_digest="$(docker buildx imagetools inspect "$IMAGE:$VERSION" | awk '/^Digest:/{print $2; exit}')"
593+
actual_digest="$(docker buildx imagetools inspect --format '{{.Manifest.Digest}}' "$IMAGE:$VERSION")"
594594
if [[ "$actual_digest" != "$MANIFEST_DIGEST" ]]; then
595595
echo '::error::The promoted stable tag does not reference the verified and attested candidate digest.'
596596
exit 1

0 commit comments

Comments
 (0)