From ce21d9c7b9afcd5b7352c87089b97ce65596ca67 Mon Sep 17 00:00:00 2001 From: guidojw <35309288+guidojw@users.noreply.github.com> Date: Wed, 11 Oct 2023 21:10:10 +0200 Subject: [PATCH] refactor(cleanup-registry): use new action --- .github/workflows/cleanup-registry.yml | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/.github/workflows/cleanup-registry.yml b/.github/workflows/cleanup-registry.yml index c95e5a20..32b82f8d 100644 --- a/.github/workflows/cleanup-registry.yml +++ b/.github/workflows/cleanup-registry.yml @@ -5,19 +5,14 @@ on: - cron: '0 0 * * 1' # https://crontab.guru/#0_0_*_*_1 workflow_dispatch: -env: - IMAGE_NAMES: arora-api - jobs: cleanup: name: Cleanup runs-on: ubuntu-latest steps: - - name: Delete old versions - uses: snok/container-retention-policy@04c70fd030033036d69c0057e0d125bf25820544 # v2.1.2 + - name: Delete untagged images + uses: actions/delete-package-versions@0d39a63126868f5eefaa47169615edd3c0f61e20 # v4.1.1 with: - image-names: ${{ env.IMAGE_NAMES }} - cut-off: 2 days ago UTC - account-type: personal - skip-tags: latest,staging - token: ${{ secrets.GH_PAT }} + package-name: ${{ github.event.repository.name }} + package-type: container + delete-only-untagged-versions: true