From 1c9b3b74c1826599d03100fa4639d42849cb71e3 Mon Sep 17 00:00:00 2001 From: olexh Date: Tue, 6 Aug 2024 17:09:33 +0300 Subject: [PATCH] chore: delete old package versions in workflow --- .github/workflows/docker-publish.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 89ae47c8..2df1ffb5 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -45,6 +45,15 @@ jobs: username: ${{ github.actor }} password: ${{ github.token }} + # Delete old package versions + # https://github.com/actions/delete-package-versions + - name: Delete old package versions + uses: actions/delete-package-versions@v5 + with: + package-name: ${{ env.IMAGE_NAME }} + package-type: 'container' + num-old-versions-to-delete: 3 + # Extract metadata (tags, labels) for Docker # https://github.com/docker/metadata-action - name: Extract Docker metadata @@ -53,14 +62,6 @@ jobs: with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - # Delete old package versions - # https://github.com/actions/delete-package-versions - - name: Delete old package versions - uses: actions/delete-package-versions@v5 - with: - package-name: 'hikka-next' - package-type: 'container' - # Build and push Docker image with Buildx (don't push on PR) # https://github.com/docker/build-push-action - name: Build and push Docker image