Repository navigation
fix(ci): digest-aware GHCR RC cleanup with loud verification - #584
Merged
Merged
Conversation
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.
Description
Fixes recurring silent failure of the
promote-release.ymlGHCR RC cleanup job. RC image tags (X.Y.Z-rc*) were never deleted becauseRELEASE_APPlacked package-admin permission (GitHub returns misleading HTTP 404). The job also used a blanketsha256-*rule that would delete live release cosign signatures once permissions were fixed.This PR switches GHCR deletes to
GITHUB_TOKEN(with repo Admin on the package), adds digest-aware RC/signature selection via a bats-tested script, and makes the cleanup step fail loudly when RC tags remain.Type of Change
feat-- New featurefix-- Bug fixdocs-- Documentation onlychore-- Maintenance task (deps, config, etc.)refactor-- Code restructuring (no behavior change)test-- Adding or updating testsci-- CI/CD pipeline changesbuild-- Build system or dependency changesrevert-- Reverts a previous commitstyle-- Code style (formatting, whitespace)Modifiers
!) -- This change breaks backward compatibilityChanges Made
.github/scripts/select-ghcr-prune-targets.sh— jq-driven selection of RC image versions and matching RC cosign signatures; preserves published release signatures.github/workflows/promote-release.yml— GHCR prune step usesGITHUB_TOKEN, calls selection script, idempotent delete with post-pass verification (fails step on leftovers)tests/bats/select-ghcr-prune-targets.bats+tests/bats/fixtures/ghcr-versions.json— bats coverage for selection logicdocs/RELEASE_CYCLE.md,docs/DOWNSTREAM_RELEASE.md— documentGITHUB_TOKEN+ package Admin grant requirementChangelog Entry
Testing
just test)Manual Testing Details
npx bats tests/bats/select-ghcr-prune-targets.bats— 4/4 greenghcr.io/vig-os/devcontainer(Manage Actions access →vig-os/devcontainer→ Admin)0.3.5-rc1*,0.3.4-rc1*) manually pruned from GHCRChecklist
docs/templates/, then runjust docs)CHANGELOG.mdin the[Unreleased]section (and pasted the entry above)Additional Notes
One-time manual prerequisite (already done): Package settings → Actions access → add
vig-os/devcontainerwith role Admin on thedevcontainerGHCR package. Without this grant, cleanup will fail visibly (red job) on the next promote.Refs: #583