Skip to content

Clean the old docker images #316

Clean the old docker images

Clean the old docker images #316

name: "Clean the old docker images"
on:
workflow_dispatch: # Manual trigger
schedule:
- cron: "21 21 * * *" # Scheduled run
jobs:
clean-ghcr:
name: Delete old unused container images
runs-on: ubuntu-latest
permissions:
packages: write
env:
REGISTRY: ghcr.io
steps:
- name: Delete 'PR' containers older than a week
uses: snok/[email protected]
with:
account: sanctuuary
image-names: "!empty"
token: ${{ secrets.GH_REPO_TOKEN }}
image-tags: "!latest"
cut-off: 2w 3d
dry-run: true