Skip to content

Commit ad8102a

Browse files
authored
ci: add cleanup step to delete untagged images
1 parent 5256776 commit ad8102a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

.github/workflows/docker-publish.yml

+9
Original file line numberDiff line numberDiff line change
@@ -81,3 +81,12 @@ jobs:
8181
platforms: linux/amd64,linux/arm64/v8
8282
cache-from: type=local,src=/tmp/.buildx-cache
8383
cache-to: type=local,dest=/tmp/.buildx-cache
84+
85+
# Clean-up untagged; See:
86+
# https://github.com/actions/delete-package-versions?tab=readme-ov-file#delete-all-untagged-container-versions-except-y-latest-untagged-versions
87+
- uses: actions/delete-package-versions@v5
88+
with:
89+
package-name: ${{ env.IMAGE_NAME }}
90+
package-type: 'container'
91+
min-versions-to-keep: 3
92+
delete-only-untagged-versions: 'true'

0 commit comments

Comments
 (0)