Skip to content

Commit 1008eb4

Browse files
committed
feat(ci): improve Docker image cleanup workflow
Replace old cleanup workflow with improved implementation: - Migrate from snok/container-retention-policy to dataaxiom/ghcr-cleanup-action - Automatic package discovery (no hardcoded package names needed) - More flexible retention policies (keep 2 most recent tagged images) - Better handling of partial and untagged images - Remove Discord notifications to reduce dependencies - Maintain monthly cleanup schedule (15th at midnight UTC) - Add manual workflow_dispatch trigger for on-demand cleanup
1 parent 68fcc41 commit 1008eb4

2 files changed

Lines changed: 28 additions & 39 deletions

File tree

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
name: Cleanup Docker Images
3+
4+
on:
5+
workflow_dispatch:
6+
schedule:
7+
- cron: "0 0 15 * *" # Monthly on the 15th at midnight UTC
8+
9+
concurrency:
10+
group: cleanup-images
11+
cancel-in-progress: false
12+
13+
jobs:
14+
cleanup:
15+
runs-on: ubuntu-latest
16+
timeout-minutes: 30
17+
permissions:
18+
packages: write # Required to delete packages
19+
contents: read
20+
steps:
21+
- name: 🧹 Cleanup Docker Images
22+
uses: dataaxiom/ghcr-cleanup-action@cd0cdb900b5dbf3a6f2cc869f0dbb0b8211f50c4 # v1.0.16
23+
with:
24+
delete-partial-images: true
25+
delete-untagged: true
26+
keep-n-tagged: 2
27+
older-than: 30 days
28+
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/cleanup.yml

Lines changed: 0 additions & 39 deletions
This file was deleted.

0 commit comments

Comments
 (0)