ghcr-retention #15
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |