Skip to content

ghcr-retention

ghcr-retention #15

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 Autoware images
uses: snok/[email protected]
with:
account: bounverif
token: ${{ secrets.GITHUB_TOKEN }}
image-names: "autoware"
image-tags: "!latest*"
cut-off: 2w
dry-run: false
- name: Clean up untagged Autoware images
uses: snok/[email protected]
with:
account: bounverif
token: ${{ secrets.GITHUB_TOKEN }}
image-names: "autoware"
tag-selection: untagged
cut-off: 1h
dry-run: false