diff --git a/.github/workflows/cleanup.yml b/.github/workflows/cleanup.yml new file mode 100644 index 00000000..bca605a9 --- /dev/null +++ b/.github/workflows/cleanup.yml @@ -0,0 +1,24 @@ +name: Cleanup Old Images +on: + schedule: + - cron: "30 0 * * 0" # 0030 UTC on Sundays + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref || github.run_id }} + +jobs: + delete-older-than-90: + runs-on: ubuntu-latest + permissions: + packages: write + steps: + - name: Delete Images Older Than 90 Days + uses: dataaxiom/ghcr-cleanup-action@v1.0.13 + with: + token: ${{ secrets.GITHUB_TOKEN }} + packages: akmods,akmods-zfs,akmods-extra,akmods-nvidia-open + older-than: 90 days + delete-orphaned-images: true + keep-n-tagged: 7 + keep-n-untagged: 7