Skip to content

ci: add weekly GHCR image retention cleanup (keep last 5)#61

Merged
trick77 merged 1 commit into
masterfrom
chore/ghcr-image-retention
Jun 11, 2026
Merged

ci: add weekly GHCR image retention cleanup (keep last 5)#61
trick77 merged 1 commit into
masterfrom
chore/ghcr-image-retention

Conversation

@trick77

@trick77 trick77 commented Jun 10, 2026

Copy link
Copy Markdown
Owner

Adds .github/workflows/cleanup-images.yaml: a weekly (Sun 04:00 UTC) + manually dispatchable workflow that prunes old GHCR container versions for the riptide-collector image, keeping the 5 most recent tagged versions and removing older/untagged ones.

Uses snok/container-retention-policy@v3.1.0, which auto-protects multi-arch/attestation child manifests of kept images (the release build via docker/build-push-action@v7 emits provenance attestations, so the naive untagged-cleanup of actions/delete-package-versions would break tagged images). A cut-off: 1h shields freshly pushed releases; workflow_dispatch has a dry-run toggle.

Mirrors the same workflow added to slopr (#167).

Adds a scheduled (weekly, Sun 04:00 UTC) + manually dispatchable
workflow that prunes old container versions from GHCR, keeping the 5
most recent tagged versions and removing older/untagged ones.

Uses snok/container-retention-policy@v3.1.0, which auto-protects the
multi-arch/attestation child manifests of kept images so the provenance
manifests from the release build are not broken. A 1h cut-off shields
freshly pushed releases, and workflow_dispatch exposes a dry-run toggle.
@trick77 trick77 merged commit 85ed134 into master Jun 11, 2026
2 checks passed
@trick77 trick77 deleted the chore/ghcr-image-retention branch June 11, 2026 05:03
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