From 40fe8d50fb16ce0337306581231509321b2c32c9 Mon Sep 17 00:00:00 2001 From: johnson2427 Date: Mon, 26 Aug 2024 14:06:29 -0500 Subject: [PATCH] feat: adding retention policy --- .github/workflows/retention.yaml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/retention.yaml diff --git a/.github/workflows/retention.yaml b/.github/workflows/retention.yaml new file mode 100644 index 0000000000..31347f4f48 --- /dev/null +++ b/.github/workflows/retention.yaml @@ -0,0 +1,23 @@ +name: Retain Images +on: + workflow_dispatch: + schedule: + - cron: "0 0 * * 6" + +env: + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }} + +jobs: + clean: + name: Delete package versions + runs-on: ubuntu-latest + steps: + - uses: snok/container-retention-policy@v3 + with: + account: ApeWorX + token: ${{ secrets.GITHUB_TOKEN }} + image-names: "ape" + image-tags: "!stable* !latest* !v0.7* !v0.8*" + cut-off: 4w + dry-run: true