2023-09-27 00:02:08 +00:00
name : Delete old container images
on :
2023-09-27 00:12:27 +00:00
workflow_dispatch : # allow running on demand
2023-09-27 00:02:08 +00:00
schedule :
2024-02-15 17:17:51 +00:00
- cron : "0 2 * * *" # every day at 2:00am UTC
2023-09-27 00:02:08 +00:00
jobs :
clean-ghcr :
name : Delete old unused container images
runs-on : ubuntu-latest
steps :
- name : Delete 'spiff' main containers older than a week
uses : snok/container-retention-policy@v2
with :
2023-10-18 19:02:45 +00:00
image-names : spiffworkflow-backend, spiffworkflow-frontend
2024-02-15 17:17:51 +00:00
cut-off : Three months ago UTC
2023-09-27 00:02:08 +00:00
account-type : org
org-name : sartography
keep-at-least : 1
filter-tags : "main-*"
2023-09-27 00:10:06 +00:00
# see https://github.com/settings/tokens/1335541013 under burnettk, classic personal access token with write:packages, read:packages, and delete:packages
2023-09-27 00:02:08 +00:00
token : ${{ secrets.PERSONAL_TOKEN_FOR_CONTAINER_CLEANUP }}