Skip to content

Commit

Permalink
Delete old packages before building new ones
Browse files Browse the repository at this point in the history
  • Loading branch information
zifeitong committed Aug 24, 2024
1 parent fc7793f commit 946a2ca
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/build-and-push-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: 16

- name: Checkout repository
uses: actions/[email protected]

Expand Down Expand Up @@ -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

0 comments on commit 946a2ca

Please sign in to comment.