-
Notifications
You must be signed in to change notification settings - Fork 12
349 lines (286 loc) · 12.7 KB
/
develop-1.1.0-aws-amplify-deploy.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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
name: Aws-Amplify-Build-Develop-1.1.0
on:
push:
branches:
- develop-1.1.0
paths:
- 'apps/taxi-bpp-v2/**'
- 'apps/retail/**'
- 'apps/mobility-bap/**'
- 'apps/policy-admin/**'
- 'apps/tourismV1.1/**'
- 'apps/dsep/**'
- 'apps/industry_4.0/**'
- 'apps/odr-v2/**'
- 'apps/dsnp-v2/**'
- 'apps/OSC/**'
- 'apps/dragon-foods/**'
- 'apps/harmoni-aids/**'
- 'apps/sky-analytics/**'
- 'apps/state-forest-department/**'
- 'apps/envirogrowth/**'
- 'apps/earth-support-initiative/**'
- 'apps/open-spark/**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 2
# taxi-bpp-v2
- name: Check for taxi-bpp-v2 changes
id: check_taxi_bpp_changes
run: |
if git diff --name-only HEAD~1 HEAD | grep '^apps/taxi-bpp-v2/'; then
echo "Changes in taxi-bpp-v2 detected."
echo "taxi_bpp_changed=true" >> $GITHUB_ENV
else
echo "No changes in taxi-bpp-v2. Skipping webhook trigger."
echo "taxi_bpp_changed=false" >> $GITHUB_ENV
fi
- name: Trigger taxi-bpp-v2 deployment if changes are detected
if: env.taxi_bpp_changed == 'true'
run: |
curl -X POST -d {} "${{ secrets.TAXI_BPP_DEVELOP_AMPLIFY_WEBHOOK_URL }}" -H "Content-Type:application/json"
# retail
- name: Check for retail changes
id: check_retail_changes
run: |
if git diff --name-only HEAD~1 HEAD | grep '^apps/retail/'; then
echo "Changes in retail detected."
echo "retail_changed=true" >> $GITHUB_ENV
else
echo "No changes in retail. Skipping webhook trigger."
echo "retail_changed=false" >> $GITHUB_ENV
fi
- name: Trigger retail deployment if changes are detected
if: env.retail_changed == 'true'
run: |
curl -X POST -d {} "${{ secrets.RETAIL_DEVELOP_AMPLIFY_WEBHOOK_URL }}" -H "Content-Type:application/json"
# mobility-bap
- name: Check for mobility-bap changes
id: check_mobility_bap_changes
run: |
if git diff --name-only HEAD~1 HEAD | grep '^apps/mobility-bap/'; then
echo "Changes in mobility-bap detected."
echo "mobility_bap_changed=true" >> $GITHUB_ENV
else
echo "No changes in mobility-bap. Skipping webhook trigger."
echo "mobility_bap_changed=false" >> $GITHUB_ENV
fi
- name: Trigger mobility-bap deployment if changes are detected
if: env.mobility_bap_changed == 'true'
run: |
curl -X POST -d {} "${{ secrets.MOBILITY_BAP_DEVELOP_AMPLIFY_WEBHOOK_URL }}" -H "Content-Type:application/json"
# policy-admin
- name: Check for policy admin changes
id: check_policy_admin_changes
run: |
if git diff --name-only HEAD~1 HEAD | grep '^apps/policy-admin/'; then
echo "Changes in policy admin detected."
echo "policy_admin_changed=true" >> $GITHUB_ENV
else
echo "No changes in policy admin. Skipping webhook trigger."
echo "policy_admin_changed=false" >> $GITHUB_ENV
fi
- name: Trigger policy admin deployment if changes are detected
if: env.policy_admin_changed == 'true'
run: |
curl -X POST -d {} "${{ secrets.POLICY_ADMIN_DEVELOP_AMPLIFY_WEBHOOK_URL }}" -H "Content-Type:application/json"
# tourismv1.1
- name: Check for tourismV1.1 changes
id: check_tourism_v1_1_changes
run: |
if git diff --name-only HEAD~1 HEAD | grep '^apps/tourismV1.1/'; then
echo "Changes in tourismV1.1 detected."
echo "tourism_v1_1_changed=true" >> $GITHUB_ENV
else
echo "No changes in tourismV1.1. Skipping webhook trigger."
echo "tourism_v1_1_changed=false" >> $GITHUB_ENV
fi
- name: Trigger tourismV1.1 deployment if changes are detected
if: env.tourism_v1_1_changed == 'true'
run: |
curl -X POST -d {} "${{ secrets.TOURISM_V1_1_DEVELOP_AMPLIFY_WEBHOOK_URL }}" -H "Content-Type:application/json"
# dsep
- name: Check for dsep changes
id: check_dsep_changes
run: |
if git diff --name-only HEAD~1 HEAD | grep '^apps/dsep/'; then
echo "Changes in dsep detected."
echo "dsep_changed=true" >> $GITHUB_ENV
else
echo "No changes in dsep. Skipping webhook trigger."
echo "dsep_changed=false" >> $GITHUB_ENV
fi
- name: Trigger dsep deployment if changes are detected
if: env.dsep_changed == 'true'
run: |
curl -X POST -d {} "${{ secrets.DSEP_DEVELOP_AMPLIFY_WEBHOOK_URL }}" -H "Content-Type:application/json"
# industry-4.0
- name: Check for industry_4.0 changes
id: check_industry_4_0_changes
run: |
if git diff --name-only HEAD~1 HEAD | grep '^apps/industry_4.0/'; then
echo "Changes in industry_4.0 detected."
echo "industry_4_0_changed=true" >> $GITHUB_ENV
else
echo "No changes in industry_4.0. Skipping webhook trigger."
echo "industry_4_0_changed=false" >> $GITHUB_ENV
fi
- name: Trigger industry_4.0 deployment if changes are detected
if: env.industry_4_0_changed == 'true'
run: |
curl -X POST -d {} "${{ secrets.INDUSTRY_4_0_DEVELOP_AMPLIFY_WEBHOOK_URL }}" -H "Content-Type:application/json"
# odr-v2
- name: Check for odr-v2 changes
id: check_odr_v2_changes
run: |
if git diff --name-only HEAD~1 HEAD | grep '^apps/odr-v2/'; then
echo "Changes in odr-v2 detected."
echo "odr_v2_changed=true" >> $GITHUB_ENV
else
echo "No changes in odr-v2. Skipping webhook trigger."
echo "odr_v2_changed=false" >> $GITHUB_ENV
fi
- name: Trigger odr-v2 deployment if changes are detected
if: env.odr_v2_changed == 'true'
run: |
curl -X POST -d {} "${{ secrets.ODR_V2_DEVELOP_AMPLIFY_WEBHOOK_URL }}" -H "Content-Type:application/json"
# dsnp-v2
- name: Check for dsnp-v2 changes
id: check_dsnp_v2_changes
run: |
if git diff --name-only HEAD~1 HEAD | grep '^apps/dsnp-v2/'; then
echo "Changes in dsnp-v2 detected."
echo "dsnp_v2_changed=true" >> $GITHUB_ENV
else
echo "No changes in dsnp-v2. Skipping webhook trigger."
echo "dsnp_v2_changed=false" >> $GITHUB_ENV
fi
- name: Trigger dsnp-v2 deployment if changes are detected
if: env.dsnp_v2_changed == 'true'
run: |
curl -X POST -d {} "${{ secrets.DSNP_V2_DEVELOP_AMPLIFY_WEBHOOK_URL }}" -H "Content-Type:application/json"
# retail-osc
- name: Check for OSC changes
id: check_osc_changes
run: |
if git diff --name-only HEAD~1 HEAD | grep '^apps/OSC/'; then
echo "Changes in OSC detected."
echo "osc_changed=true" >> $GITHUB_ENV
else
echo "No changes in OSC. Skipping webhook trigger."
echo "osc_changed=false" >> $GITHUB_ENV
fi
- name: Trigger OSC deployment if changes are detected
if: env.osc_changed == 'true'
run: |
curl -X POST -d {} "${{ secrets.OSC_DEVELOP_AMPLIFY_WEBHOOK_URL }}" -H "Content-Type:application/json"
# dragon-foods
- name: Check for dragon-foods changes
id: check_dragon-foods_changes
run: |
if git diff --name-only HEAD~1 HEAD | grep '^apps/dragon-foods/'; then
echo "Changes in dragon-foods detected."
echo "dragon-foods_changed=true" >> $GITHUB_ENV
else
echo "No changes in dragon-foods. Skipping webhook trigger."
echo "dragon-foods_changed=false" >> $GITHUB_ENV
fi
- name: Trigger dragon-foods deployment if changes are detected
if: env.dragon-foods_changed == 'true'
run: |
curl -X POST -d {} "${{ secrets.DRAGON_FOODS_DEVELOP_AMPLIFY_WEBHOOK_URL }}" -H "Content-Type:application/json"
# harmoni-aids
- name: Check for harmoni-aids changes
id: check_harmoni-aids_changes
run: |
if git diff --name-only HEAD~1 HEAD | grep '^apps/harmoni-aids/'; then
echo "Changes in harmoni-aids detected."
echo "harmoni-aids_changed=true" >> $GITHUB_ENV
else
echo "No changes in harmoni-aids. Skipping webhook trigger."
echo "harmoni-aids_changed=false" >> $GITHUB_ENV
fi
- name: Trigger harmoni-aids deployment if changes are detected
if: env.harmoni-aids_changed == 'true'
run: |
curl -X POST -d {} "${{ secrets.HARMONI_AIDS_DEVELOP_AMPLIFY_WEBHOOK_URL }}" -H "Content-Type:application/json"
# sky-analytics
- name: Check for sky-analytics changes
id: check_sky-analytics_changes
run: |
if git diff --name-only HEAD~1 HEAD | grep '^apps/sky-analytics/'; then
echo "Changes in sky-analytics detected."
echo "sky-analytics_changed=true" >> $GITHUB_ENV
else
echo "No changes in sky-analytics. Skipping webhook trigger."
echo "sky-analytics_changed=false" >> $GITHUB_ENV
fi
- name: Trigger sky-analytics deployment if changes are detected
if: env.sky-analytics_changed == 'true'
run: |
curl -X POST -d {} "${{ secrets.SKY_ANALYTICS_DEVELOP_AMPLIFY_WEBHOOK_URL }}" -H "Content-Type:application/json"
# state-forest-department
- name: Check for state-forest-department changes
id: check_state-forest-department_changes
run: |
if git diff --name-only HEAD~1 HEAD | grep '^apps/state-forest-department/'; then
echo "Changes in state-forest-department detected."
echo "state-forest-department_changed=true" >> $GITHUB_ENV
else
echo "No changes in state-forest-department. Skipping webhook trigger."
echo "state-forest-department=false" >> $GITHUB_ENV
fi
- name: Trigger state-forest-department deployment if changes are detected
if: env.state-forest-department_changed == 'true'
run: |
curl -X POST -d {} "${{ secrets.STATE_FOREST_DEPARTMENT_DEVELOP_AMPLIFY_WEBHOOK_URL }}" -H "Content-Type:application/json"
# envirogrowth
- name: Check for envirogrowth changes
id: check_envirogrowth_changes
run: |
if git diff --name-only HEAD~1 HEAD | grep '^apps/envirogrowth/'; then
echo "Changes in envirogrowth detected."
echo "envirogrowth_changed=true" >> $GITHUB_ENV
else
echo "No changes in envirogrowth. Skipping webhook trigger."
echo "envirogrowth=false" >> $GITHUB_ENV
fi
- name: Trigger envirogrowth deployment if changes are detected
if: env.envirogrowth_changed == 'true'
run: |
curl -X POST -d {} "${{ secrets.ENVIROGROWTH_DEVELOP_AMPLIFY_WEBHOOK_URL }}" -H "Content-Type:application/json"
# earth-support-initiative
- name: Check for earth-support-initiative changes
id: check_earth-support-initiative_changes
run: |
if git diff --name-only HEAD~1 HEAD | grep '^apps/earth-support-initiative/'; then
echo "Changes in earth-support-initiative detected."
echo "earth-support-initiative_changed=true" >> $GITHUB_ENV
else
echo "No changes in earth-support-initiative. Skipping webhook trigger."
echo "earth-support-initiative=false" >> $GITHUB_ENV
fi
- name: Trigger earth-support-initiative deployment if changes are detected
if: env.earth-support-initiative_changed == 'true'
run: |
curl -X POST -d {} "${{ secrets.EARTH_SUPPORT_INITIATIVE_DEVELOP_AMPLIFY_WEBHOOK_URL }}" -H "Content-Type:application/json"
# open-spark
- name: Check for open-spark changes
id: check_open-spark_changes
run: |
if git diff --name-only HEAD~1 HEAD | grep '^apps/open-spark/'; then
echo "Changes in open-spark detected."
echo "open-spark_changed=true" >> $GITHUB_ENV
else
echo "No changes in open-spark. Skipping webhook trigger."
echo "open-spark=false" >> $GITHUB_ENV
fi
- name: Trigger open-spark deployment if changes are detected
if: env.open-spark_changed == 'true'
run: |
curl -X POST -d {} "${{ secrets.OPEN_SPARK_DEVELOP_AMPLIFY_WEBHOOK_URL }}" -H "Content-Type:application/json"