fix: extract manifest digest correctly for attestation

This commit is contained in:
Till Wegmueller 2025-11-29 20:45:04 +01:00
parent 6ef8f0b266
commit 80a56a137a
No known key found for this signature in database

View file

@ -113,7 +113,7 @@ jobs:
# Get the digest of the first tag (version tag) for attestation # Get the digest of the first tag (version tag) for attestation
FIRST_TAG=$(echo '${{ steps.meta.outputs.tags }}' | head -n1) FIRST_TAG=$(echo '${{ steps.meta.outputs.tags }}' | head -n1)
DIGEST=$(docker buildx imagetools inspect ${FIRST_TAG} --format '{{.Manifest.Digest}}') DIGEST=$(docker buildx imagetools inspect ${FIRST_TAG} --raw | sha256sum | cut -d' ' -f1 | awk '{print "sha256:" $0}')
echo "digest=${DIGEST}" >> $GITHUB_OUTPUT echo "digest=${DIGEST}" >> $GITHUB_OUTPUT
- name: Generate artifact attestation - name: Generate artifact attestation