From 1367f4c93ed8348065e3eeac535c4cc53eff2df1 Mon Sep 17 00:00:00 2001 From: Meo597 <197331664+Meo597@users.noreply.github.com> Date: Fri, 30 Oct 2026 06:50:55 +0800 Subject: [PATCH] dry run cleanup `sha-` --- .github/workflows/cleanup-sha-images.yml | 30 ++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/cleanup-sha-images.yml diff --git a/.github/workflows/cleanup-sha-images.yml b/.github/workflows/cleanup-sha-images.yml new file mode 100644 index 000000000..15f3dfa0a --- /dev/null +++ b/.github/workflows/cleanup-sha-images.yml @@ -0,0 +1,30 @@ +name: Cleanup sha- container images + +on: + push: + branches: + - bulk-cleanup-ghcr + +# Run the two cleanup workflows one at a time. +concurrency: + group: ghcr-images + cancel-in-progress: false + +jobs: + cleanup: + runs-on: ubuntu-latest + timeout-minutes: 120 + permissions: + packages: write + steps: + # The repository needs Admin access under the package's Manage Actions access. + - name: Delete versions with only sha- tags + uses: dataaxiom/ghcr-cleanup-action@v1.2.2 + with: + package: xray-core + use-regex: true + delete-tags: '^sha-' + # Preserve every non-sha- tag. The colon check avoids matching digests. + exclude-tags: '^(?!sha-)[^:]+$' + delete-untagged: false + dry-run: true