Skip to content

ghcr-retention

ghcr-retention #3

name: ghcr-retention
on:
workflow_dispatch:
schedule:
- cron: "0 12 * * 0"
permissions:
contents: read
packages: write
jobs:
clean:
runs-on: ubuntu-latest
name: Github Container Registry Retention Policy
steps:
- name: Clean up old images
uses: snok/[email protected]
with:
account: bounverif
token: ${{ secrets.GITHUB_TOKEN }}
image-names: "rvstd"
image-tags: "!latest*"
cut-off: 24w
dry-run: false
- name: Clean up untagged images
uses: snok/[email protected]
with:
account: bounverif
token: ${{ secrets.GITHUB_TOKEN }}
image-names: "rvstd"
tag-selection: untagged
cut-off: 1h
dry-run: false