diff --git a/.github/workflows/build-and-push-image.yml b/.github/workflows/build-and-push-image.yml index 7d597c6..542f32d 100644 --- a/.github/workflows/build-and-push-image.yml +++ b/.github/workflows/build-and-push-image.yml @@ -25,6 +25,13 @@ jobs: id-token: write steps: + - name: Delete old packages + uses: actions/delete-package-versions@v5 + with: + package-name: ${{ matrix.image }} + package-type: "container" + min-versions-to-keep: 4 + - name: Checkout repository uses: actions/checkout@v4.1.6 @@ -62,10 +69,3 @@ jobs: subject-name: ${{ env.REGISTRY }}/${{ env.USER_NAME }}/${{ matrix.image }} subject-digest: ${{ steps.push.outputs.digest }} push-to-registry: true - - - name: Delete old packages - uses: actions/delete-package-versions@v5 - with: - package-name: ${{ matrix.image }} - package-type: 'container' - min-versions-to-keep: 3