Cleanup Untagged Packages #3
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
| --- | |
| name: Cleanup Untagged Packages | |
| "on": | |
| schedule: | |
| # Run every Sunday at 02:00 UTC | |
| - cron: '0 2 * * 0' | |
| workflow_dispatch: | |
| jobs: | |
| cleanup: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - name: Delete untagged copr-bridge images | |
| id: cleanup-copr-bridge | |
| continue-on-error: true | |
| uses: actions/delete-package-versions@v5 | |
| with: | |
| package-name: copr-bridge | |
| package-type: container | |
| min-versions-to-keep: 5 | |
| delete-only-untagged-versions: true | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Report cleanup results | |
| run: | | |
| echo "Cleanup Results:" | |
| echo "COPR Bridge container cleanup: ${{ steps.cleanup-copr-bridge.outcome }}" | |
| if [[ "${{ steps.cleanup-copr-bridge.outcome }}" == "failure" ]]; then | |
| echo "Warning: COPR Bridge container cleanup failed - package may not exist yet" | |
| fi | |
| echo "Cleanup workflow completed" |