Skip to content

Delete old container images #4

Delete old container images

Delete old container images #4

name: Delete old container images
on:
workflow_dispatch:
schedule:
- cron: "0 1 * * *"
jobs:
clean-ghcr:
name: Delete old unused container images
runs-on: ubuntu-latest
steps:
- name: Delete old containers
uses: snok/container-retention-policy@v2
with:
image-names: "*"
dry-run: true
untagged-only: true
cut-off: Two minutes ago UTC
account-type: personal
keep-at-least: 1
token: ${{ secrets.GHCR_TOKEN }}