From f18badbd5ddea43b1a6572f76ea6ad428dc3fc1c Mon Sep 17 00:00:00 2001 From: Andrei Tataranovich Date: Wed, 13 Nov 2024 10:37:52 +0300 Subject: [PATCH] chore: cleanup untagged images --- .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 0000000..37dd0be --- /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"