-
Notifications
You must be signed in to change notification settings - Fork 53
79 lines (77 loc) · 2.83 KB
/
ghcrCleanup.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: Delete old container images
on:
schedule:
- cron: "0 0 * * *" # every day
jobs:
clean_ghcr:
name: Delete container images
runs-on: ubuntu-latest
steps:
# backend, cypress, database, frontend, frontend-lighthouse, nginx
- name: Delete backend container images
uses: actions/delete-package-versions@v5
with:
package-name: 'prime-simplereport/backend'
package-type: 'container'
min-versions-to-keep: 100
delete-only-untagged-versions: 'false'
- name: Sleep for 45 seconds because of secondary rate limit
run: sleep 45
shell: bash
- name: Delete cypress container images
uses: actions/delete-package-versions@v5
with:
package-name: 'prime-simplereport/cypress'
package-type: 'container'
min-versions-to-keep: 100
delete-only-untagged-versions: 'false'
- name: Sleep for 45 seconds because of secondary rate limit
run: sleep 45
shell: bash
- name: Delete database container images
uses: actions/delete-package-versions@v5
with:
package-name: 'prime-simplereport/database'
package-type: 'container'
min-versions-to-keep: 100
delete-only-untagged-versions: 'false'
- name: Sleep for 45 seconds because of secondary rate limit
run: sleep 45
shell: bash
- name: Delete db container images
uses: actions/delete-package-versions@v5
with:
package-name: 'prime-simplereport/db'
package-type: 'container'
min-versions-to-keep: 100
delete-only-untagged-versions: 'false'
- name: Sleep for 45 seconds because of secondary rate limit
run: sleep 45
shell: bash
- name: Delete frontend container images
uses: actions/delete-package-versions@v5
with:
package-name: 'prime-simplereport/frontend'
package-type: 'container'
min-versions-to-keep: 100
delete-only-untagged-versions: 'false'
- name: Sleep for 45 seconds because of secondary rate limit
run: sleep 45
shell: bash
- name: Delete frontend-lighthouse container images
uses: actions/delete-package-versions@v5
with:
package-name: 'prime-simplereport/frontend-lighthouse'
package-type: 'container'
min-versions-to-keep: 100
delete-only-untagged-versions: 'false'
- name: Sleep for 45 seconds because of secondary rate limit
run: sleep 45
shell: bash
- name: Delete nginx container images
uses: actions/delete-package-versions@v5
with:
package-name: 'prime-simplereport/nginx'
package-type: 'container'
min-versions-to-keep: 100
delete-only-untagged-versions: 'false'