Skip to content

Delete old container images #13

Delete old container images

Delete old container images #13

name: Delete old container images
on:
# schedule:
# - cron: "0 0 1 * *" # every day at midnight
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: k2eg/ubuntu, k2eg/debian
cut-off: A week ago UTC
account-type: org
org-name: slaclab
keep-at-least: 1
untagged-only: true
token: ${{ secrets.GITHUB_TOKEN }}