Every PR leaves a <pr-number> tag on GHCR, plus an untagged version for each re-push. quickstart-openshift-helpers .pr-close.yml retags on merge but never deletes anything. Storage is free for public packages, but private packages count against org storage, and the package version lists keep growing.
Writing cleanup by hand is risky because promotion makes images share digests:
prod, test or latest can be the same version as a PR tag, so deleting that version deletes prod.
- With multi-arch images (see the
builder platforms issue), the per-architecture manifests are untagged children of an index. A naive "delete untagged" breaks every multi-arch tag.
Proposal
A cleanup action (new, or a cleanup mode on image-tracker) for PR-close flows:
- Delete PR-only versions. Delete package versions whose only tag is the PR tag.
- Protect promoted images. Skip any version that a protected tag (
prod, test, latest, configurable) points to or references as an index child.
- Opt-in untagged pruning. Optionally delete untagged versions older than N days, with the same protection for index children.
Acceptance
Every PR leaves a
<pr-number>tag on GHCR, plus an untagged version for each re-push.quickstart-openshift-helpers.pr-close.ymlretags on merge but never deletes anything. Storage is free for public packages, but private packages count against org storage, and the package version lists keep growing.Writing cleanup by hand is risky because promotion makes images share digests:
prod,testorlatestcan be the same version as a PR tag, so deleting that version deletes prod.builderplatformsissue), the per-architecture manifests are untagged children of an index. A naive "delete untagged" breaks every multi-arch tag.Proposal
A cleanup action (new, or a
cleanupmode onimage-tracker) for PR-close flows:prod,test,latest, configurable) points to or references as an index child.Acceptance
prodquickstart-openshift-helpers.pr-close.ymlcalls the cleanup action