Cleanup Old Images #22
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: "0 0 * * 0" # Weekly on Sunday at midnight UTC | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref || github.run_id }} | |
| jobs: | |
| delete-older-than-90: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| packages: write | |
| steps: | |
| - name: Delete Images Older Than 90 Days | |
| uses: dataaxiom/ghcr-cleanup-action@cd0cdb900b5dbf3a6f2cc869f0dbb0b8211f50c4 # v1.0.16 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| # IMPORTANT: Update this to match your image name from Containerfile (line 9) | |
| # This should match the "# Name: your-repo-name" comment in your Containerfile | |
| # Example: If your Containerfile has "# Name: my-custom-os", use "my-custom-os" here | |
| packages: finpilot | |
| older-than: 90 days | |
| delete-orphaned-images: true | |
| keep-n-tagged: 7 | |
| keep-n-untagged: 7 |