Debug image signing workflow failure#51
Merged
JoshuaAFerguson merged 2 commits intoNov 16, 2025
Merged
Conversation
Resolves timing issues when signing images in consolidated workflow. The registry needs time to propagate multi-platform manifests after push. Changes: - Add retry logic (5 attempts with exponential backoff) to all signing steps - Add retry logic to all SBOM attestation steps - Improved error handling and debugging output - Initial delay: 2s, doubles each retry (2s, 4s, 8s, 16s, 32s) Root cause: When build/sign run in same workflow without delays, the manifest may not be immediately available for inspection via imagetools. Separate workflows had natural timing gaps that allowed propagation. This fix addresses failures like: - 'docker buildx imagetools inspect' returning incomplete/truncated digests - Cosign unable to reference images with malformed digest strings
Use docker manifest inspect with jq as primary method, fallback to
grep-based extraction from imagetools output. This resolves the issue
where --format template returned the full manifest instead of digest.
Changes:
- Use 'docker manifest inspect | jq .digest' for reliable extraction
- Fallback to grep pattern matching on imagetools output
- Keep retry logic with exponential backoff for manifest propagation
- Applied to all 6 digest extraction points (3 sign + 3 attest steps)
Fixes error: 'ERROR: unexpected digest format: Name: ghcr.io/...'
Root cause: The --format '{{.Manifest.Digest}}' template doesn't work
reliably with docker buildx imagetools for multi-platform manifests.
Using manifest inspect with JSON parsing is more reliable.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.