Delete old container images #16
This file contains 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: Delete old container images | |
on: | |
schedule: | |
- cron: "0 0 1 * *" # every day at midnight | |
jobs: | |
clean-ghcr: | |
name: GHCR cleanup | |
runs-on: ubuntu-latest | |
steps: | |
- name: Delete all untagged Hotfixes older than 6 months | |
uses: snok/[email protected] | |
with: | |
image-names: ceph | |
image-tags: hotfix-* | |
cut-off: 6months | |
timestamp-to-use: updated_at | |
tag-selection: both # select both tagged and untagged package versions | |
keep-n-most-recent: 5 # keep up to `n` tagged package versions for each of the packages | |
account-type: org | |
org-name: canonical | |
token: ${{ secrets.GITHUB_TOKEN }} | |
token-type: github-token | |