Cleanup Old Images #69
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 Old Images | |
| on: | |
| schedule: | |
| - cron: "15 1 * * 4" # Runs at 01:15, only on Thursday. | |
| workflow_dispatch: | |
| jobs: | |
| delete-older-than-30: | |
| runs-on: ubuntu-24.04-arm | |
| permissions: | |
| packages: write | |
| steps: | |
| - name: Harden the runner (Audit all outbound calls) | |
| uses: step-security/harden-runner@a90bcbc6539c36a85cdfeb73f7e2f433735f215b # v2.15.0 | |
| with: | |
| egress-policy: audit | |
| - name: Delete Images Older Than 30 Days | |
| uses: dataaxiom/ghcr-cleanup-action@cd0cdb900b5dbf3a6f2cc869f0dbb0b8211f50c4 # v1 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| packages: fedora-createrepo-image | |
| older-than: 30 days | |
| delete-orphaned-images: true | |
| keep-n-tagged: 7 | |
| keep-n-untagged: 7 |