File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed
Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -170,9 +170,14 @@ jobs:
170170 ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ github.sha }}-amd64 \
171171 ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ github.sha }}-arm64
172172
173- # Get the digest of the multi-arch manifest
174- DIGEST=$(docker buildx imagetools inspect ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:latest --format '{{.Manifest.Digest}}')
173+ # Get the digest of the multi-arch manifest using docker inspect
174+ DIGEST=$(docker manifest inspect ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:latest | jq -r '.digest // empty')
175+ if [ -z "$DIGEST" ]; then
176+ # Fallback: get digest from the registry API
177+ DIGEST=$(docker inspect ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:latest --format='{{index .RepoDigests 0}}' | cut -d'@' -f2)
178+ fi
175179 echo "digest=$DIGEST" >> $GITHUB_OUTPUT
180+ echo "Manifest digest: $DIGEST"
176181
177182 - name : Generate SLSA attestation for multi-arch manifest
178183 uses : actions/attest-build-provenance@v1
Original file line number Diff line number Diff line change @@ -115,9 +115,14 @@ jobs:
115115 ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }}-arm64
116116 done
117117
118- # Get the digest of the release manifest
119- DIGEST=$(docker buildx imagetools inspect ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }} --format '{{.Manifest.Digest}}')
118+ # Get the digest of the release manifest using docker inspect
119+ DIGEST=$(docker manifest inspect ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }} | jq -r '.digest // empty')
120+ if [ -z "$DIGEST" ]; then
121+ # Fallback: get digest from the registry API
122+ DIGEST=$(docker inspect ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }} --format='{{index .RepoDigests 0}}' | cut -d'@' -f2)
123+ fi
120124 echo "digest=$DIGEST" >> $GITHUB_OUTPUT
125+ echo "Release manifest digest: $DIGEST"
121126
122127 - name : Generate SLSA attestation for release manifest
123128 uses : actions/attest-build-provenance@v1
You can’t perform that action at this time.
0 commit comments