From 831963bc68214ce0fee73dba0b1fef6a77344539 Mon Sep 17 00:00:00 2001 From: Andrey Tataranovich Date: Wed, 13 Nov 2024 16:37:01 +0300 Subject: [PATCH] chore: cleanup untagged images (#56) --- .github/workflows/cleanup-untagged-images.yml | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/cleanup-untagged-images.yml diff --git a/.github/workflows/cleanup-untagged-images.yml b/.github/workflows/cleanup-untagged-images.yml new file mode 100644 index 00000000..37dd0beb --- /dev/null +++ b/.github/workflows/cleanup-untagged-images.yml @@ -0,0 +1,20 @@ +name: Cleanup untagged images + +on: + schedule: + - cron: "0 0 * * *" + +jobs: + clean: + name: Delete untagged images + runs-on: ubuntu-latest + permissions: + packages: write + steps: + - uses: snok/container-retention-policy@4f22ef80902ad409ed55a99dc5133cc1250a0d03 # v3.0.0 + with: + account: ${{ github.repository_owner }} + token: ${{ secrets.GITHUB_TOKEN }} + image-names: ${{ github.event.repository.name }} + tag-selection: "untagged" + cut-off: "1d"