Skip to content

Delete old container images #55

Delete old container images

Delete old container images #55

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 all test containers older than a month, using a wildcard
uses: snok/container-retention-policy@v1
with:
image-names: fastapi-demo*
cut-off: A week ago UTC
account-type: personal
keep-at-least: 5
skip-tags: latest
token: ${{ secrets.GHCR_PAT }}