Add GHCR package retention workflow - #124
Conversation
Replace ad hoc image cleanup with a tested retention policy that inventories all published GHCR packages, generates dry-run reports, and supports manual deletion with protected version pins. Document the retention rules and link them from release verification.
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Critical workflow and test defects, plus validation and reporting gaps, remain unresolved.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 2
Open (2)
What changed in this PR
Adds a GHCR package-retention workflow with policy-driven inventory, dry-run reporting, protected versions, controlled deletion, tests, and documentation.
Changes:
- Implements retention planning, preflight validation, and deletion reporting.
- Adds package policies and retention tests.
- Documents retention rules and links them from release verification.
| File | Description |
|---|---|
scripts/package-retention.test.mjs |
Tests retention and deletion safety behavior. |
scripts/package-retention.mjs |
Implements inventory, retention, preflight, and deletion logic. |
ops/release/package-retention.json |
Defines packages, retention thresholds, and protected pins. |
docs/operations/release-verification.md |
Links release verification to retention documentation. |
docs/operations/package-retention.md |
Documents retention policies and safety boundaries. |
.github/workflows/cleanup.yml |
Runs scheduled and manual retention operations. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| uses: actions/delete-package-versions@v5 | ||
| continue-on-error: true | ||
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
| - uses: actions/setup-node@v4 |
|
|
||
| test('a sparsely published package retains its rollback versions across all packages', () => { | ||
| const inventory = fixture(); | ||
| inventory['teslasync-fleet-telemetry'] = inventory['teslasync-fleet-telemetry'].slice(0, 2); |
|
One or more custom setup steps configured for this repository failed during this Copilot code review run: Setup steps run before each review. If the review above is missing context, or no review was posted at all, the failing step above may be the cause. See the workflow run for failure details, fix your setup steps configuration, and re-request a review. Note You can configure setup steps for Copilot code review separately from Copilot cloud agent with a |

Replace ad hoc image cleanup with a tested retention policy that inventories all published GHCR packages, generates dry-run reports, and supports manual deletion with protected version pins. Document the retention rules and link them from release verification.
Description
Closes #
Type of Change
Checklist
Screenshots (if applicable)