Delete old container images #1
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: Delete old unused container images | |
runs-on: ubuntu-latest | |
steps: | |
- name: Delete 'dev' containers older than a week | |
uses: snok/container-retention-policy@v2 | |
with: | |
image-names: "*" | |
cut-off: A week ago UTC | |
account-type: org | |
org-name: acdh-oeaw | |
keep-at-least: 1 | |
untagged-only: true | |
token: ${{ secrets.PAT }} | |
- name: Delete all test containers older than a month, using a wildcard | |
uses: snok/container-retention-policy@v2 | |
with: | |
image-names: "*" | |
cut-off: One month ago UTC | |
account-type: org | |
org-name: acdh-oeaw | |
keep-at-least: 1 | |
skip-tags: latest | |
token: ${{ secrets.PAT }} |