-
Notifications
You must be signed in to change notification settings - Fork 18
129 lines (116 loc) · 3.77 KB
/
cleanup_and_maintainance.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
name: "Cleanup and Maintainance"
on:
workflow_dispatch:
schedule:
- cron: "16 23 * * 1"
jobs:
dockercleanup:
runs-on: ubuntu-latest
name: "Pruning Untagged Images"
# using https://github.com/marketplace/actions/ghcr-pruning
steps:
- name: "brmo-bgt-loader older than 1 week"
uses: vlaurin/[email protected]
with:
token: ${{ secrets.GHCR_CLEANUP_PAT }}
organization: B3Partners
container: brmo-bgt-loader
dry-run: false
keep-younger-than: 7
keep-last: 1
prune-untagged: true
- name: "brmo-service older than 1 week"
uses: vlaurin/[email protected]
with:
token: ${{ secrets.GHCR_CLEANUP_PAT }}
organization: B3Partners
container: brmo-service
dry-run: false
keep-younger-than: 7
keep-last: 1
prune-untagged: true
- name: "brmo-service-db older than 1 week"
uses: vlaurin/[email protected]
with:
token: ${{ secrets.GHCR_CLEANUP_PAT }}
organization: B3Partners
container: brmo-service-db
dry-run: false
keep-younger-than: 7
keep-last: 1
prune-untagged: true
- name: "brmo-bag2-loader older than 1 week"
continue-on-error: true
uses: vlaurin/[email protected]
with:
token: ${{ secrets.GHCR_CLEANUP_PAT }}
organization: B3Partners
container: brmo-bag2-loader
dry-run: false
keep-younger-than: 7
keep-last: 1
prune-untagged: true
- name: "brmo-bgt-loader older than 4 weeks"
uses: vlaurin/[email protected]
with:
token: ${{ secrets.GHCR_CLEANUP_PAT }}
organization: B3Partners
container: brmo-bgt-loader
dry-run: false
keep-younger-than: 28
keep-last: 0
prune-untagged: true
- name: "brmo-service older than 4 weeks"
uses: vlaurin/[email protected]
with:
token: ${{ secrets.GHCR_CLEANUP_PAT }}
organization: B3Partners
container: brmo-service
dry-run: false
keep-younger-than: 28
keep-last: 0
prune-untagged: true
- name: "brmo-service-db older than 4 weeks"
uses: vlaurin/[email protected]
with:
token: ${{ secrets.GHCR_CLEANUP_PAT }}
organization: B3Partners
container: brmo-service-db
dry-run: false
keep-younger-than: 28
keep-last: 0
prune-untagged: true
- name: "brmo-bag2-loader older than 4 weeks"
continue-on-error: true
uses: vlaurin/[email protected]
with:
token: ${{ secrets.GHCR_CLEANUP_PAT }}
organization: B3Partners
container: brmo-bag2-loader
dry-run: false
keep-younger-than: 28
keep-last: 0
prune-untagged: true
otherworkflows:
runs-on: ubuntu-latest
name: "Cleanup all old workflow runs"
steps:
- name: Delete workflow runs
uses: boredland/[email protected]
with:
days-old: 60
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
stale:
runs-on: ubuntu-latest
name: "Close Stale PRs"
permissions:
pull-requests: write
steps:
- uses: actions/stale@v9
with:
days-before-stale: 60
days-before-close: 14
stale-pr-label: 'stale'
exempt-pr-labels: 'dependency update'
stale-pr-message: 'Dit PR is automatisch gemarkeerd als "stale" omdat er niet meer aan gewerkt wordt. Als er niets meer mee gebeurd zal deze PR automatisch worden gesloten.'