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