diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 6a48228..1eec6d1 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -74,6 +74,9 @@ jobs: cleanup-packages: runs-on: ubuntu-latest needs: build-and-push-image # This ensures cleanup runs after successful build and push + permissions: + contents: read + packages: write steps: - name: Delete old frontend packages uses: actions/delete-package-versions@v4 @@ -82,11 +85,13 @@ jobs: package-type: 'container' min-versions-to-keep: 3 delete-only-untagged-versions: false - + num-old-versions-to-delete: 10 # Delete up to 10 old versions at a time + - name: Delete old backend packages uses: actions/delete-package-versions@v4 with: package-name: ${{ env.BACKEND_IMAGE_NAME }} package-type: 'container' min-versions-to-keep: 3 - delete-only-untagged-versions: false \ No newline at end of file + delete-only-untagged-versions: false + num-old-versions-to-delete: 10 # Delete up to 10 old versions at a time \ No newline at end of file