fix(ci): stop the runtime image build failing on the digest filename - #1379
Open
beatsmonster wants to merge 1 commit into
Open
fix(ci): stop the runtime image build failing on the digest filename#1379beatsmonster wants to merge 1 commit into
beatsmonster wants to merge 1 commit into
Conversation
The `Export the digest` step named its marker file after the raw build output, `sha256:<hex>`. `actions/upload-artifact@v4` rejects any path containing a colon, so both matrix legs died *after* pushing their layers and the `manifest` job — `needs: build` — was never reached. The two architectures have therefore only ever existed in ghcr.io as untagged digests: `:latest`, `:<sha>` and every release tag are absent. 47 runs, 0 successes. `factory contained setup` pulls and does not build, so this is the whole cold start for a new user. Strip the prefix when naming the file; the manifest step's existing `sed 's/^sha256://'` puts it back and stays tolerant of either form. Also fix a latent second failure in a step that, because of the above, had never once executed: the architecture check grepped the raw manifest bytes for `"architecture":"amd64"`, which only matches when buildx marshals the index compactly. Read it with jq instead, so a whitespace change cannot fail the check on a good image *after* the tags are already published. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Signed-off-by: Yi Zheng <237498169+beatsmonster@users.noreply.github.com>
Sentrux Quality ReportAbsoluteDiff (vs base branch) |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1379 +/- ##
==========================================
+ Coverage 84.83% 84.84% +0.01%
==========================================
Files 205 205
Lines 23287 23287
Branches 3700 3700
==========================================
+ Hits 19755 19758 +3
+ Misses 2696 2693 -3
Partials 836 836 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
The problem
.github/workflows/runtime-image.ymlhas never published a tag — 47 runs on record, 0 successes. Every one dies in the same place:Export the digestnames its marker file after the raw build output,sha256:<hex>.actions/upload-artifact@v4rejects any path containing a colon, so both matrix legs fail after pushing their layers, andmanifest(needs: build) is never reached. The two architectures have therefore only ever existed in ghcr.io as untagged digests —:latest,:<sha>and every release tag are absent.That is the failure the file's own header warns about:
factory contained setuppulls and does not build, so this is the entire cold start for a new user.The fix
sha256:prefix when naming the digest file, passed throughenv:rather than interpolated. The manifest step's existingsed 's/^sha256://'puts it back and stays tolerant of either form."architecture":"amd64", which only matches when buildx marshals the index compactly. It now reads the index withjq, so a whitespace change cannot fail the check on a good image after the tags are already pushed.Verification
Dispatched on this branch under a throwaway tag, so an unmerged branch could not move
:latest— run 32533265869, green:…and the smoke test pulled that manifest and ran it:
factory --help,tmux 3.5a,git version 2.52.0.One piece of cleanup for someone with
packages: writeon the registry: the throwaway:digest-fix-probetag can be deleted once this merges. On merge, the push tomainrepublishes:latestand:<sha>for real.🤖 Generated with Claude Code