From cf86933497195b5528df54ea7a8260cfe9d367fc Mon Sep 17 00:00:00 2001 From: "Jorge O. Castro" Date: Sat, 23 Nov 2024 19:25:08 -0700 Subject: [PATCH] chore(ci): add 90 day cleanup action (#1961) --- .github/workflows/clean.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/clean.yml diff --git a/.github/workflows/clean.yml b/.github/workflows/clean.yml new file mode 100644 index 00000000000..e3b60535c40 --- /dev/null +++ b/.github/workflows/clean.yml @@ -0,0 +1,24 @@ +name: Cleanup Old Images +on: + schedule: + - cron: "15 0 * * 0" # 0015 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: bluefin, bluefin-dx, bluefin-nvidia, bluefin-dx-nvidia + older-than: 90 days + delete-orphaned-images: true + keep-n-tagged: 7 + keep-n-untagged: 7