-
Notifications
You must be signed in to change notification settings - Fork 0
112 lines (101 loc) · 3.92 KB
/
ga-image-sanitize.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
name: 🧼 Sanitize – Generated Docker Images
on:
pull_request:
types: [closed]
workflow_dispatch:
inputs:
keep-last:
description: >
Delete all untagged images except the last N
required: false
default: "1"
jobs:
delete-pr-tagged-image:
name: 🗑️ Delete PR${{github.event.pull_request.number}} Image
runs-on: ubuntu-latest
steps:
- name: 🗑️ Delete 🚀 API Gateway image PR${{github.event.pull_request.number}}
uses: bots-house/[email protected]
with:
owner: 01-edu
name: content-api-gateway-app
token: ${{ secrets.GITHUB_TOKEN }}
tag: PR${{github.event.pull_request.number}}
continue-on-error: true
- name: 🗑️ Delete 🧩 Inventory App image PR${{github.event.pull_request.number}}
uses: bots-house/[email protected]
with:
owner: 01-edu
name: content-inventory-app
token: ${{ secrets.GITHUB_TOKEN }}
tag: PR${{github.event.pull_request.number}}
continue-on-error: true
- name: 🗑️ Delete 💻 Postgres DB image PR${{github.event.pull_request.number}}
uses: bots-house/[email protected]
with:
owner: 01-edu
name: content-postgres-db
token: ${{ secrets.GITHUB_TOKEN }}
tag: PR${{github.event.pull_request.number}}
continue-on-error: true
- name: 🗑️ Delete 🐰 Rabbitmq image PR${{github.event.pull_request.number}}
uses: bots-house/[email protected]
with:
owner: 01-edu
name: content-rabbitmq
token: ${{ secrets.GITHUB_TOKEN }}
tag: PR${{github.event.pull_request.number}}
continue-on-error: true
- name: 🗑️ Delete 💰 Billing App image PR${{github.event.pull_request.number}}
uses: bots-house/[email protected]
with:
owner: 01-edu
name: content-billing-app
token: ${{ secrets.GITHUB_TOKEN }}
tag: PR${{github.event.pull_request.number}}
continue-on-error: true
delete-untagged-images:
name: 🔥 Clear Untagged Images
needs: delete-pr-tagged-image
runs-on: ubuntu-latest
steps:
- name: 🔥 Clear all untagged 🚀 API Gateway image
uses: bots-house/[email protected]
with:
owner: 01-edu
name: content-api-gateway-app
token: ${{ secrets.GITHUB_TOKEN }}
untagged-keep-latest: ${{ github.event.inputs.keep-last }}
continue-on-error: true
- name: 🗑️ Delete 🧩 Inventory App image
uses: bots-house/[email protected]
with:
owner: 01-edu
name: content-inventory-app
token: ${{ secrets.GITHUB_TOKEN }}
untagged-keep-latest: ${{ github.event.inputs.keep-last }}
continue-on-error: true
- name: 🗑️ Delete 💻 Postgres DB image
uses: bots-house/[email protected]
with:
owner: 01-edu
name: content-postgres-db
token: ${{ secrets.GITHUB_TOKEN }}
untagged-keep-latest: ${{ github.event.inputs.keep-last }}
continue-on-error: true
- name: 🗑️ Delete 🐰 Rabbitmq image
uses: bots-house/[email protected]
with:
owner: 01-edu
name: content-rabbitmq
token: ${{ secrets.GITHUB_TOKEN }}
untagged-keep-latest: ${{ github.event.inputs.keep-last }}
continue-on-error: true
- name: 🗑️ Delete 💰 Billing App image
uses: bots-house/[email protected]
with:
owner: 01-edu
name: content-billing-app
token: ${{ secrets.GITHUB_TOKEN }}
untagged-keep-latest: ${{ github.event.inputs.keep-last }}
continue-on-error: true