chore: add container retention policy workflow
This commit is contained in:
parent
2460a98428
commit
63c82c76f7
|
|
@ -0,0 +1,24 @@
|
|||
name: 'Clean up GHCR Packages'
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 0 * * 0'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
cleanup:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
packages: write
|
||||
contents: read
|
||||
steps:
|
||||
- name: Delete old container versions (30+ days)
|
||||
uses: snok/container-retention-policy@3b0972b2276b171b212f8c4efbca59ebba26eceb # v3.0.1
|
||||
with:
|
||||
account: user
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
image-names: ${{ github.event.repository.name }}
|
||||
image-tags: '* !latest'
|
||||
cut-off: 30d
|
||||
keep-n-most-recent: 5
|
||||
dry-run: false
|
||||
Loading…
Reference in New Issue