Delete old container images #308
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 * * *' | |
workflow_dispatch: | |
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: docker/*-dev | |
cut-off: A week ago UTC | |
account-type: org | |
org-name: baresip | |
keep-at-least: 1 | |
untagged-only: true | |
token: ${{ secrets.PAT }} | |
- name: Delete 'stable' containers older two months | |
uses: snok/container-retention-policy@v2 | |
with: | |
image-names: docker/* | |
cut-off: six months ago UTC | |
account-type: org | |
org-name: baresip | |
keep-at-least: 1 | |
skip-tags: latest | |
token: ${{ secrets.PAT }} |