Skip to content

Commit 428793e

Browse files
committed
feat: cleanup old GitHub packages
This commit refactors the code to include a new step called "package-cleanup" in the docker-publish workflow. The step is responsible for deleting old package versions of the "linuxgsm" container, keeping only one version and deleting untagged versions. This change improves the efficiency and organization of our GitHub packages.
1 parent e277f17 commit 428793e

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

.github/workflows/docker-publish.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,3 +134,16 @@ jobs:
134134
tags: |
135135
gameservermanagers/linuxgsm:ubuntu-18.04
136136
ghcr.io/gameservermanagers/linuxgsm:ubuntu-18.04
137+
138+
package-cleanup:
139+
name: Cleanup Old GitHub Packages
140+
needs: [ build-ubuntu-1804, build-ubuntu-2004, build-ubuntu-2204 ]
141+
runs-on: ubuntu-latest
142+
steps:
143+
- name: Delete Package Versions
144+
uses: actions/delete-package-versions@v4
145+
with:
146+
package-name: linuxgsm
147+
package-type: container
148+
min-versions-to-keep: 1
149+
delete-only-untagged-versions: true

0 commit comments

Comments
 (0)