Delete old container images #84
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: | |
workflow_dispatch: {} | |
schedule: | |
- cron: '0 0 * * *' # every day at midnight | |
jobs: | |
clean-ghcr: | |
name: Delete old unused container images | |
runs-on: ubuntu-latest | |
steps: | |
- name: Delete CI containers | |
uses: snok/container-retention-policy@v2 | |
with: | |
image-names: postal | |
cut-off: Two hours ago UTC | |
filter-tags: ci-* | |
account-type: org | |
org-name: postalserver | |
token: ${{ secrets.PAT }} | |
- name: Delete commit containers | |
uses: snok/container-retention-policy@v2 | |
with: | |
image-names: postal | |
cut-off: Two hours ago UTC | |
filter-tags: commit-* | |
account-type: org | |
org-name: postalserver | |
token: ${{ secrets.PAT }} | |
- name: Delete branch containers | |
uses: snok/container-retention-policy@v2 | |
with: | |
image-names: postal | |
cut-off: One month ago UTC | |
filter-tags: branch-* | |
account-type: org | |
org-name: postalserver | |
token: ${{ secrets.PAT }} |