Skip to content

Commit 23ac941

Browse files
committed
ci(framework-build-base): name a failed digest-tag read-back apart from a held tag
A write whose read-back differs now says the tag was written and the digest is not yet held, instead of claiming nothing changed. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jSrcejjpWHd8D1fpmZ
1 parent 9287977 commit 23ac941

1 file changed

Lines changed: 12 additions & 6 deletions

File tree

‎.github/workflows/framework-build-base.yml‎

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -253,9 +253,12 @@ jobs:
253253
# so the tag would not hold DIGEST at all.
254254
docker buildx imagetools create --prefer-index=false --tag "$TAG" "$IMAGE@$DIGEST"
255255
HELD="$(held)"
256-
fi
257-
if [ "$HELD" != "$DIGEST" ]; then
258-
echo "::error::$TAG holds ${HELD:-nothing}, not $DIGEST. A digest tag is never re-pointed, so nothing was changed; read the tag's history in the package's settings before touching it."
256+
if [ "$HELD" != "$DIGEST" ]; then
257+
echo "::error::wrote $TAG, but it reads back as ${HELD:-nothing}, not $DIGEST, so $DIGEST is not yet held by a tag of its own."
258+
exit 1
259+
fi
260+
elif [ "$HELD" != "$DIGEST" ]; then
261+
echo "::error::$TAG already holds $HELD, not $DIGEST. A digest tag is never re-pointed, so nothing was changed; read the tag's history in the package's settings before touching it."
259262
exit 1
260263
fi
261264
echo "$TAG holds $DIGEST"
@@ -338,9 +341,12 @@ jobs:
338341
# so the tag would not hold DIGEST at all.
339342
docker buildx imagetools create --prefer-index=false --tag "$TAG" "$IMAGE@$DIGEST"
340343
HELD="$(held)"
341-
fi
342-
if [ "$HELD" != "$DIGEST" ]; then
343-
echo "::error::$TAG holds ${HELD:-nothing}, not $DIGEST. A digest tag is never re-pointed, so nothing was changed; read the tag's history in the package's settings before touching it."
344+
if [ "$HELD" != "$DIGEST" ]; then
345+
echo "::error::wrote $TAG, but it reads back as ${HELD:-nothing}, not $DIGEST, so $DIGEST is not yet held by a tag of its own."
346+
exit 1
347+
fi
348+
elif [ "$HELD" != "$DIGEST" ]; then
349+
echo "::error::$TAG already holds $HELD, not $DIGEST. A digest tag is never re-pointed, so nothing was changed; read the tag's history in the package's settings before touching it."
344350
exit 1
345351
fi
346352
echo "$TAG holds $DIGEST"

0 commit comments

Comments
 (0)