Add staging-cleanup and exercise it on the test packages - #10
Open
alexadereyko wants to merge 4 commits into
Open
Add staging-cleanup and exercise it on the test packages#10alexadereyko wants to merge 4 commits into
alexadereyko wants to merge 4 commits into
Conversation
alexadereyko
force-pushed
the
jira/TBBAS-3293-staging-cleanup
branch
4 times, most recently
from
July 23, 2026 13:14
e9a6728 to
b442d34
Compare
alexadereyko
force-pushed
the
jira/TBBAS-3297-stage-facade
branch
from
July 23, 2026 16:29
6b9b93d to
3d392c2
Compare
staging-cleanup is a reusable workflow that prunes aged staging packages: for each caller path, any index older than its retention window is removed through the index -- fetch it, delete its children by digest, then the index. It never deletes untagged versions, since the live children are untagged too. A repo points it at the paths it owns (e.g. its nightly channel) on a schedule. test-cleanup runs it against the throwaway test/* packages, starting as a dry-run.
Add org.opencontainers.image.created to the index annotations so a consumer can read each staging's age straight from the registry.
Find EOL enumerates each package's indexes with oras and reads their age from the org.opencontainers.image.created annotation, emitting the end-of-life digests (each stale index's children, then the index). Prune (ghcr) resolves those digests to GitHub Packages versions and deletes them over REST, since ghcr has no OCI manifest delete. Reading is registry-agnostic; only the prune step and the up-front guard are ghcr-specific. Retention sums days + hours + minutes + seconds. Exercise it end to end: publish real artifacts through staging-push, prune them with a 1-second retention, and assert the path is empty.
alexadereyko
force-pushed
the
jira/TBBAS-3293-staging-cleanup
branch
from
July 23, 2026 16:40
b442d34 to
e6a1622
Compare
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.
Depends on:
Adds
staging-cleanup(reusable) — prunes indexes older than a per-path retention window, through the index.test-cleanupexercises it on the throwaway test/* packages, starting as a dry-run.