Skip to content

Commit b13b4a7

Browse files
committed
chore(ci): prune old GHCR container images after each build
Keep only the 3 most recent server and frontend images to avoid unbounded storage growth in GitHub Container Registry.
1 parent edd6464 commit b13b4a7

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

.github/workflows/docker.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,19 @@ jobs:
5151
ghcr.io/uid4oe/agent-orchestration-patterns-frontend:${{ github.sha }}
5252
cache-from: type=gha
5353
cache-to: type=gha,mode=max
54+
55+
- name: Prune old server images
56+
uses: actions/delete-package-versions@v5
57+
with:
58+
package-name: agent-orchestration-patterns-server
59+
package-type: container
60+
min-versions-to-keep: 3
61+
delete-only-untagged-versions: false
62+
63+
- name: Prune old frontend images
64+
uses: actions/delete-package-versions@v5
65+
with:
66+
package-name: agent-orchestration-patterns-frontend
67+
package-type: container
68+
min-versions-to-keep: 3
69+
delete-only-untagged-versions: false

0 commit comments

Comments
 (0)