-
Notifications
You must be signed in to change notification settings - Fork 3
116 lines (111 loc) · 3.35 KB
/
deploy_images.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
name: Build and push Docker images
on:
push:
branches:
- 'master'
tags:
- 'v*'
workflow_dispatch:
inputs:
branch:
type: string
default: master
description: Branch to build images from
required: false
gateway:
type: boolean
default: true
description: Build new image of api-gateway
required: false
backend:
type: boolean
default: true
description: Build new image of save-backend
required: false
frontend:
type: boolean
default: true
description: Build new image of save-frontend
required: false
orchestrator:
type: boolean
default: true
description: Build new image of save-orchestrator
required: false
sandbox:
type: boolean
default: true
description: Build new image of save-sandbox
required: false
preprocessor:
type: boolean
default: true
description: Build new image of save-preprocessor
required: false
demo:
type: boolean
default: true
description: Build new image of save-demo
required: false
demo-cpg:
type: boolean
default: true
description: Build new image of save-demo-cpg
required: false
jobs:
build_cli:
name: Build save-cli
uses: ./.github/workflows/build_save-cli_reusable.yml
deploy_backend:
name: save-backend
uses: ./.github/workflows/deploy_images_reusable.yml
needs: build_cli
with:
module: save-backend
branch: ${{ inputs.branch }}
do-build: ${{ github.event_name != 'workflow_dispatch' || inputs.backend }}
override-docker-tag: ${{ github.event_name == 'workflow_dispatch' }}
save-cli-version: ${{ needs.build_cli.outputs.version }}
deploy_sandbox:
name: save-sandbox
uses: ./.github/workflows/deploy_images_reusable.yml
needs: build_cli
with:
module: save-sandbox
branch: ${{ inputs.branch }}
do-build: ${{ github.event_name != 'workflow_dispatch' || inputs.sandbox }}
override-docker-tag: ${{ github.event_name == 'workflow_dispatch' }}
save-cli-version: ${{ needs.build_cli.outputs.version }}
deploy_all:
name: all excluding save-backend and save-sandbox
strategy:
fail-fast: false
matrix:
module: [
'api-gateway',
'save-frontend',
'save-orchestrator',
'save-preprocessor',
'save-demo',
'save-demo-cpg',
]
include:
- module: api-gateway
do-build: ${{ inputs.gateway }}
- module: save-frontend
do-build: ${{ inputs.frontend }}
- module: save-orchestrator
do-build: ${{ inputs.orchestrator }}
- module: save-preprocessor
do-build: ${{ inputs.preprocessor }}
- module: save-demo
do-build: ${{ inputs.demo }}
- module: save-demo-cpg
do-build: ${{ inputs.demo-cpg }}
uses: ./.github/workflows/deploy_images_reusable.yml
with:
module: ${{ matrix.module }}
branch: ${{ inputs.branch }}
do-build: ${{ github.event_name != 'workflow_dispatch' || matrix.do-build }}
override-docker-tag: ${{ github.event_name == 'workflow_dispatch' }}
save-cli-version: stub