add cleanup script for GHCR
This commit is contained in:
parent
189b0cc65c
commit
286b525fd1
1 changed files with 21 additions and 0 deletions
21
.github/workflows/cleanup.yml
vendored
Normal file
21
.github/workflows/cleanup.yml
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
name: Ryd op i GHCR
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: '0 0 * * 0' # Kører hver søndag ved midnat
|
||||||
|
workflow_dispatch: # Gør det muligt at køre den manuelt
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
delete-old-images:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
packages: write
|
||||||
|
steps:
|
||||||
|
- name: Slet gamle versioner
|
||||||
|
uses: actions/delete-package-versions@v5
|
||||||
|
with:
|
||||||
|
package-name: 'os-26535' # Skift til dit image navn
|
||||||
|
package-type: 'container'
|
||||||
|
min-versions-to-keep: 50
|
||||||
|
delete-only-untagged-versions: 'false'
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue