Repository navigation
ci: add scheduled GHCR cleanup of stale devcontainer versions - #1239
Merged
Merged
Conversation
Weekly referrer-aware sweep of the vig-os/devcontainer org package: delete-untagged reaps orphaned nix-dev discovery generations, delete-orphaned-images reaps dangling attestation referrers left by the promote-release RC prune. Config-only change (no TDD surface); validated by three local dry-runs of the pinned action against the live package — no release, floating, or cosign tag and no live attestation referrer in any delete set. Refs: #1238
4 tasks
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.
Closes #1238
What
Adds a devkit-only scheduled workflow
.github/workflows/ghcr-cleanup.yml(weekly Mon 04:00 UTC +workflow_dispatchwithdry-rundefaulting to true for safe manual previews) that prunes stale versions of thevig-os/devcontainerorg package usingdataaxiom/ghcr-cleanup-actionv1.2.2 (SHA-pinned; Renovate'sgithub-actionsmanager will keep it fresh):delete-untagged: true— orphanednix-dev*discovery generations (~3 per dev/epic push).delete-orphaned-images: true— dangling attestation referrers + orphanedsha256-*referrer tags left behind by the promote-release RC prune.older-than: 7 daysage guard,validate: truemanifest integrity check.GITHUB_TOKENwith job-scopedpackages: write— same mechanism as the existing promote-release GHCR prune step.Not scaffolded to consumers (root workflows only; not in
assets/workspace/or the sync manifest), so outside the zizmor-managed audit scope; covered by actionlint/yamllint/shellcheck pre-commit hooks. No CHANGELOG entry per repo rules (ci-internal).Validation evidence (pre-merge, acceptance criteria of #1238)
Ran the pinned action locally (
node dist/index.jsatd52806a0, Node 24) against the live package, three configurations, alldry-run=true(587 versions loaded each run):delete-untagged+older-than: 7 daysdelete-untaggedonlydelete-orphaned-images1.4.0/latest,1.3.1,1.3.0, currentnix-dev*trio, allsha256-*cosign/referrer tags of live releases, and the untagged attestation children of 1.4.0/1.3.1/1.3.0 (cross-checked against live referrer indexes fetched from GHCR).nix-devgenerations (index + arch children) and dangling attestation manifests (subject digest gone) land in the delete set; the dangling ones specifically requiredelete-orphaned-images(run 3), hence that option.validatemode: 107 warnings (existing dangling-referrer debt this workflow removes), 0 errors, no ghost/partial images.Notes
workflow_dispatch(dry-run preview) can be exercised any time after merge as a final live check.