Skip to content

Delete old container images #86

Delete old container images

Delete old container images #86

Workflow file for this run

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 }}