Skip to content

Commit 0efa658

Browse files
committed
feat: add housekeeping workflow for container image cleanup
1 parent 93b73d0 commit 0efa658

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

.github/workflows/housekeeping.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Housekeeping
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: '0 4 * * 1'
7+
8+
jobs:
9+
image-cleanup:
10+
name: Cleanup Container Images
11+
runs-on: ubuntu-latest
12+
permissions:
13+
packages: write
14+
steps:
15+
- name: Delete untagged images
16+
uses: dataaxiom/ghcr-cleanup-action@v1
17+
with:
18+
dry-run: true
19+
delete-untagged: true
20+
keep-n-untagged: 10
21+
- name: Delete old release candidate images
22+
uses: dataaxiom/ghcr-cleanup-action@v1
23+
with:
24+
dry-run: true
25+
delete-tags: '*-rc*'
26+
keep-n-tagged: 3

0 commit comments

Comments
 (0)