feat(image-tag-cleanup): wire cleanup into Docker Hub + GHCR - #77
Merged
Merged
Conversation
JSisques
changed the base branch from
feat/image-tag-cleanup-01-select-logic
to
main
September 16, 2026 09:59
Adds the registry-facing half of tag retention (builds on feat/image-tag-cleanup-01-select-logic's pure selection logic): - cleanup-dockerhub.sh: lists tags via the Docker Hub API, deletes only what select-deletions.sh selects. - cleanup-ghcr.sh: lists package versions via the GitHub API (a version can carry several tags at once — skipped entirely if any tag is non-ephemeral), same delegation. - Composite action wrapping both behind a registry: dockerhub|ghcr input, and a new reusable workflow (image-cleanup.yml) calling it once per enabled registry. No on: trigger of its own — the consumer repo owns the schedule. Recorded as design.md D9 and tasks.md section 6. dry_run defaults false but is documented as the required first step on any new repo.
JSisques
force-pushed
the
feat/image-tag-cleanup-02-registries
branch
from
September 16, 2026 10:00
035d6e0 to
2e8b2c1
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.
Summary
Second of two PRs implementing image tag retention. Builds on #76's pure selection logic — wires it into real Docker Hub and GHCR API calls, behind a new reusable workflow.
cleanup-dockerhub.sh: paginates the Docker Hub tags API, delegates the delete decision toselect-deletions.sh, deletes only what it selects.cleanup-ghcr.sh: paginates the GitHub packages API for container versions (a version can carry multiple tags — skipped entirely if any tag doesn't match the ephemeral prefix), same delegation.image-tag-cleanupwrapping both behindregistry: dockerhub | ghcr.image-cleanup.yml— noon:trigger of its own, the consumer repo owns the schedule (see README usage example).Also records this as
design.mdD9 andtasks.mdsection 6, and documentsDOCKERHUB_TOKEN's Read/Write/Delete scope requirement (same trap as the existing Docker Hub description sync).Chain Context
feat/image-tag-cleanup-01-select-logicimage-cleanup.ymlinto beacon-api (the pilot repo) with a real schedule,dry_run: truefirstChain Overview
Test plan
actionlintclean onimage-cleanup.ymlshellcheckclean on the new registry scriptstests/image-tag-cleanup-select.test.shstill 9/9 (unchanged logic)dry_run: truerun against a real repo — planned as the beacon-api follow-up