mirror of
https://github.com/GoodOlClint/PSProxmoxVE.git
synced 2026-08-11 06:46:53 +00:00
chore(ci): add GHCR cleanup job to delete old container image versions
Each push creates a ~770MB container image tagged with the commit SHA. Add a cleanup job that runs after integration tests complete, keeping only the most recent version and deleting all others. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -89,6 +89,22 @@ jobs:
|
||||
push: true
|
||||
tags: ${{ env.TEST_IMAGE }}:${{ github.sha }},${{ env.TEST_IMAGE }}:latest
|
||||
|
||||
# ── Clean up old container images from GHCR ──────────────────────────
|
||||
cleanup-images:
|
||||
needs: integration
|
||||
if: always()
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
steps:
|
||||
- name: Delete old container image versions
|
||||
uses: actions/delete-package-versions@v5
|
||||
with:
|
||||
package-name: psproxmoxve-integration
|
||||
package-type: container
|
||||
min-versions-to-keep: 1
|
||||
delete-only-untagged-versions: false
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
# ── Integration tests (self-hosted runner in Docker container) ───────
|
||||
integration:
|
||||
needs: [build, container-image]
|
||||
|
||||
Reference in New Issue
Block a user