-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (37 loc) · 1.33 KB
/
.reusable-cleanup-registry.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: cleanup registry
on:
workflow_call:
permissions: {}
jobs:
cleanup-registry:
runs-on: ubuntu-latest
steps:
- name: Cleanup test images
uses: snok/container-retention-policy@4f22ef80902ad409ed55a99dc5133cc1250a0d03 # v3.0.0
with:
image-names: semgr8s-test
cut-off: three weeks ago UTC+1
timestamp-to-use: updated_at
account-type: org
org-name: semgr8ns
token: ${{ secrets.GHCR_PAT }}
- name: Cleanup dangling images without tag
uses: snok/container-retention-policy@4f22ef80902ad409ed55a99dc5133cc1250a0d03 # v3.0.0
with:
image-names: semgr8s*
untagged-only: true
cut-off: four hours ago UTC+1
timestamp-to-use: updated_at
account-type: org
org-name: semgr8ns
token: ${{ secrets.GHCR_PAT }}
# - name: Cleanup all images
# uses: snok/container-retention-policy@4f22ef80902ad409ed55a99dc5133cc1250a0d03 # v3.0.0
# with:
# image-names: semgr8s
# skip-tags: main, dev, "v*.*.*", "sha256-*"
# cut-off: four days ago UTC+1
# timestamp-to-use: updated_at
# account-type: org
# org-name: semgr8ns
# token: ${{ secrets.GHCR_PAT }}