Fix manifest digest extraction for multi-arch Docker images#77
Fix manifest digest extraction for multi-arch Docker images#77JaredHatfield merged 3 commits intomainfrom
Conversation
The previous approach using `--format '{{.Manifest.Digest}}'` produced
multi-line output for multi-platform images (OCI index), including
struct fields like MediaType which broke $GITHUB_OUTPUT parsing.
Computing sha256 of the raw manifest bytes is the standard and most
reliable way to get a manifest list digest.
Agent-Logs-Url: https://github.com/UnitVectorY-Labs/hellorest/sessions/c8d87948-abf6-4926-90fd-d919ec581b33
Co-authored-by: JaredHatfield <208119+JaredHatfield@users.noreply.github.com>
|
I think this is totally wrong. Look into this again and come up with the correct solution after performing the appropriate research using subagents. |
Agent-Logs-Url: https://github.com/UnitVectorY-Labs/hellorest/sessions/f66800c3-f199-4862-a76d-e1decd80db08 Co-authored-by: JaredHatfield <208119+JaredHatfield@users.noreply.github.com>
Updated in 5244659. I re-ran the investigation with subagent research plus local reproduction on |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #77 +/- ##
=====================================
Coverage 0.00% 0.00%
=====================================
Files 1 1
Lines 17 17
=====================================
Misses 17 17 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
docker buildx imagetools inspect --format '{{.Manifest.Digest}}'is unreliable on the GitHub Actions runner used by this workflow. Instead of returning only the digest, buildx ignores the plain template and emits the default multi-line inspection output (MediaType: application/vnd.oci.image.index.v1+json, etc.), which breaks$GITHUB_OUTPUTparsing.This returns a clean single-line
sha256:...digest for the multi-arch manifest, which can be safely written to$GITHUB_OUTPUTand passed toactions/attest-build-provenance.The change is intentionally minimal and scoped to the manifest job in the release Docker workflow.
💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.