Skip to content

Prune old images

Prune old images #175

name: Prune old images
permissions:
contents: read
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * *" # every day
jobs:
clean:
environment: operations
runs-on: ubuntu-latest
name: Delete old test images
steps:
- uses: snok/container-retention-policy@3b0972b2276b171b212f8c4efbca59ebba26eceb # v3.0.1
with:
account: unkeyed
token: ${{ secrets.PAT }}
image-names: "unkey agent"
image-tags: "!latest"
keep-n-most-recent: 10
cut-off: 4w
dry-run: true