From 7ed5ce70d40e4ab4850edf5710de32d54aff4d9e Mon Sep 17 00:00:00 2001 From: phantom <137958098+phantomcortex@users.noreply.github.com> Date: Tue, 14 Oct 2025 16:40:47 -0600 Subject: [PATCH] Create clean-images.yaml Credit: https://github.com/vst-name/ublue-aurora-dx/blob/main/.github/workflows/clean-images.yaml --- .github/workflows/clean-images.yaml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/clean-images.yaml diff --git a/.github/workflows/clean-images.yaml b/.github/workflows/clean-images.yaml new file mode 100644 index 0000000..bb329f6 --- /dev/null +++ b/.github/workflows/clean-images.yaml @@ -0,0 +1,24 @@ +name: Cleanup Old Images +on: + schedule: + - cron: "15 0 * * 0" + 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 Older Images + uses: dataaxiom/ghcr-cleanup-action@cd0cdb900b5dbf3a6f2cc869f0dbb0b8211f50c4 # v1.0.16 + with: + token: ${{ secrets.GITHUB_TOKEN }} + packages: distinctionos + older-than: 14 days + delete-orphaned-images: true + keep-n-tagged: 7 + keep-n-untagged: 7