Skip to content

Stop GHCR SHA tag buildup#41

Merged
CaspianG merged 1 commit into
mainfrom
agent/ghcr-package-retention
Jul 13, 2026
Merged

Stop GHCR SHA tag buildup#41
CaspianG merged 1 commit into
mainfrom
agent/ghcr-package-retention

Conversation

@CaspianG

Copy link
Copy Markdown
Owner

Summary

  • stop publishing a new sha-* container tag on every main push
  • add a scheduled and manually dispatchable GHCR retention workflow
  • delete only package versions whose complete tag set consists of one-off sha-* tags
  • preserve latest, main, semver tags, custom tags, and untagged manifests
  • add focused tests for the retention policy and container metadata

Why

The repository's Deployments API was already small, but GitHub Packages had accumulated hundreds of SHA-only container versions. This change fixes the source of that package clutter and provides a bounded cleanup mechanism without deleting release images or provenance attestations.

Validation

  • 22 passed across package-retention and packaging tests
  • retention script compiles with Python 3.11
  • git diff --check passed

After merge, the workflow will be run in preview mode first. Cleanup will only be applied after reviewing the reported candidates.

@CaspianG CaspianG merged commit 7699bfd into main Jul 13, 2026
16 checks passed
@CaspianG CaspianG deleted the agent/ghcr-package-retention branch July 13, 2026 23:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant