|
79 | 79 | ghcr.io/${{ github.repository }}
|
80 | 80 | ${{ secrets.DOCKER_HUB_USERNAME }}/${{ github.event.repository.name }}
|
81 | 81 | tags: |
|
82 |
| - type=raw,value=production-latest,enable=${{ github.ref == 'refs/heads/v*' }} |
83 |
| - type=raw,value=production-latest-${{ github.run_number }}-{{date 'YYYYMMDD'}}-{{sha}},enable=${{ github.ref == 'refs/heads/v*' }} |
| 82 | + type=raw,value=production-latest,enable=${{ startsWith(github.event.ref, 'refs/tags/v') }} |
| 83 | + type=raw,value=production-latest-${{ github.run_number }}-{{date 'YYYYMMDD'}}-{{sha}},enable=${{ startsWith(github.event.ref, 'refs/tags/v') }} |
84 | 84 | type=raw,value=staging-latest,enable=${{ github.ref == 'refs/heads/staging' }}
|
85 | 85 | type=raw,value=staging-latest-${{ github.run_number }}-{{date 'YYYYMMDD'}}-{{sha}},enable=${{ github.ref == 'refs/heads/staging' }}
|
86 | 86 | type=raw,value=latest,enable=${{ github.ref == 'refs/heads/develop' }}
|
@@ -152,316 +152,9 @@ jobs:
|
152 | 152 | name: Staging-GCP
|
153 | 153 | url: https://care-staging.ohc.network/
|
154 | 154 | steps:
|
155 |
| - - name: Checkout Kube Config |
156 |
| - uses: actions/checkout@v3 |
157 |
| - with: |
158 |
| - repository: coronasafe/care-staging-gcp |
159 |
| - token: ${{ secrets.GIT_ACCESS_TOKEN }} |
160 |
| - path: kube |
161 |
| - ref: main |
162 |
| - |
163 |
| - - uses: actions/setup-node@v3 |
164 |
| - with: |
165 |
| - node-version: '20' |
166 |
| - |
167 |
| - # Setup gcloud CLI |
168 |
| - - uses: google-github-actions/setup-gcloud@94337306dda8180d967a56932ceb4ddcf01edae7 |
169 |
| - with: |
170 |
| - service_account_key: ${{ secrets.GKE_SA_KEY }} |
171 |
| - project_id: ${{ secrets.GKE_PROJECT }} |
172 |
| - |
173 |
| - # Get the GKE credentials so we can deploy to the cluster |
174 |
| - - uses: google-github-actions/get-gke-credentials@fb08709ba27618c31c09e014e1d8364b02e5042e |
175 |
| - with: |
176 |
| - cluster_name: ${{ secrets.GKE_CLUSTER }} |
177 |
| - location: ${{ secrets.GKE_ZONE }} |
178 |
| - credentials: ${{ secrets.GKE_SA_KEY }} |
179 |
| - |
180 |
| - - name: install kubectl |
181 |
| - uses: azure/setup-kubectl@v3 |
182 |
| - with: |
183 |
| - version: "v1.23.6" |
184 |
| - id: install |
185 |
| - |
186 |
| - - name: Deploy Care Fe Production |
187 |
| - run: | |
188 |
| - mkdir -p $HOME/.kube/ |
189 |
| - cd kube/deployments/ |
190 |
| - sed -i -e "s/_BUILD_NUMBER_/${GITHUB_RUN_NUMBER}/g" care-fe.yaml |
191 |
| - kubectl apply -f care-fe.yaml |
192 |
| -
|
193 |
| - deploy-production-manipur: |
194 |
| - needs: notify-release |
195 |
| - name: Deploy to GKE Manipur |
196 |
| - runs-on: ubuntu-latest |
197 |
| - environment: |
198 |
| - name: Production-Manipur |
199 |
| - url: https://care.mn.gov.in |
200 |
| - steps: |
201 |
| - - name: Checkout Kube Config |
202 |
| - uses: actions/checkout@v3 |
203 |
| - with: |
204 |
| - repository: coronasafe/mn-care-infra |
205 |
| - token: ${{ secrets.GIT_ACCESS_TOKEN }} |
206 |
| - path: kube |
207 |
| - ref: main |
208 |
| - |
209 |
| - - uses: actions/setup-node@v3 |
210 |
| - with: |
211 |
| - node-version: '20' |
212 |
| - |
213 |
| - # Setup gcloud CLI |
214 |
| - - uses: google-github-actions/setup-gcloud@94337306dda8180d967a56932ceb4ddcf01edae7 |
215 |
| - with: |
216 |
| - service_account_key: ${{ secrets.GKE_SA_KEY }} |
217 |
| - project_id: ${{ secrets.GKE_PROJECT }} |
218 |
| - |
219 |
| - # Get the GKE credentials so we can deploy to the cluster |
220 |
| - - uses: google-github-actions/get-gke-credentials@fb08709ba27618c31c09e014e1d8364b02e5042e |
221 |
| - with: |
222 |
| - cluster_name: ${{ secrets.GKE_CLUSTER }} |
223 |
| - location: ${{ secrets.GKE_ZONE }} |
224 |
| - credentials: ${{ secrets.GKE_SA_KEY }} |
225 |
| - |
226 |
| - - name: install kubectl |
227 |
| - uses: azure/setup-kubectl@v3 |
228 |
| - with: |
229 |
| - version: "v1.23.6" |
230 |
| - id: install |
231 |
| - |
232 |
| - - name: Deploy Care Fe Production |
233 |
| - run: | |
234 |
| - mkdir -p $HOME/.kube/ |
235 |
| - cd kube/deployments/ |
236 |
| - sed -i -e "s/_BUILD_NUMBER_/${GITHUB_RUN_NUMBER}/g" care-fe.yaml |
237 |
| - kubectl apply -f care-fe.yaml |
238 |
| -
|
239 |
| - deploy-production-karnataka: |
240 |
| - needs: notify-release |
241 |
| - name: Deploy to GKE Karnataka |
242 |
| - runs-on: ubuntu-latest |
243 |
| - environment: |
244 |
| - name: Production-Karnataka |
245 |
| - url: https://karnataka.care |
246 |
| - steps: |
247 |
| - - name: Checkout Kube Config |
248 |
| - uses: actions/checkout@v3 |
249 |
| - with: |
250 |
| - repository: coronasafe/ka-care-infra |
251 |
| - token: ${{ secrets.GIT_ACCESS_TOKEN }} |
252 |
| - path: kube |
253 |
| - ref: main |
254 |
| - |
255 |
| - - uses: actions/setup-node@v3 |
256 |
| - with: |
257 |
| - node-version: '20' |
258 |
| - |
259 |
| - # Setup gcloud CLI |
260 |
| - - uses: google-github-actions/setup-gcloud@94337306dda8180d967a56932ceb4ddcf01edae7 |
261 |
| - with: |
262 |
| - service_account_key: ${{ secrets.GKE_SA_KEY }} |
263 |
| - project_id: ${{ secrets.GKE_PROJECT }} |
264 |
| - |
265 |
| - # Get the GKE credentials so we can deploy to the cluster |
266 |
| - - uses: google-github-actions/get-gke-credentials@fb08709ba27618c31c09e014e1d8364b02e5042e |
267 |
| - with: |
268 |
| - cluster_name: ${{ secrets.GKE_CLUSTER }} |
269 |
| - location: ${{ secrets.GKE_ZONE }} |
270 |
| - credentials: ${{ secrets.GKE_SA_KEY }} |
271 |
| - |
272 |
| - - name: install kubectl |
273 |
| - uses: azure/setup-kubectl@v3 |
274 |
| - with: |
275 |
| - version: "v1.23.6" |
276 |
| - id: install |
277 |
| - |
278 |
| - - name: Deploy Care Fe Production |
279 |
| - run: | |
280 |
| - mkdir -p $HOME/.kube/ |
281 |
| - cd kube/deployments/ |
282 |
| - sed -i -e "s/_BUILD_NUMBER_/${GITHUB_RUN_NUMBER}/g" care-fe.yaml |
283 |
| - kubectl apply -f care-fe.yaml |
284 |
| -
|
285 |
| - deploy-production-sikkim: |
286 |
| - needs: notify-release |
287 |
| - name: Deploy to GKE Sikkim |
288 |
| - runs-on: ubuntu-latest |
289 |
| - environment: |
290 |
| - name: Production-Sikkim |
291 |
| - url: https://care.sikkim.gov.in |
292 |
| - steps: |
293 |
| - - name: Checkout Kube Config |
294 |
| - uses: actions/checkout@v3 |
295 |
| - with: |
296 |
| - repository: coronasafe/sk-care-infra |
297 |
| - token: ${{ secrets.GIT_ACCESS_TOKEN }} |
298 |
| - path: kube |
299 |
| - ref: main |
300 |
| - |
301 |
| - - uses: actions/setup-node@v3 |
302 |
| - with: |
303 |
| - node-version: '20' |
304 |
| - |
305 |
| - # Setup gcloud CLI |
306 |
| - - uses: google-github-actions/setup-gcloud@94337306dda8180d967a56932ceb4ddcf01edae7 |
307 |
| - with: |
308 |
| - service_account_key: ${{ secrets.GKE_SA_KEY }} |
309 |
| - project_id: ${{ secrets.GKE_PROJECT }} |
310 |
| - |
311 |
| - # Get the GKE credentials so we can deploy to the cluster |
312 |
| - - uses: google-github-actions/get-gke-credentials@fb08709ba27618c31c09e014e1d8364b02e5042e |
313 |
| - with: |
314 |
| - cluster_name: ${{ secrets.GKE_CLUSTER }} |
315 |
| - location: ${{ secrets.GKE_ZONE }} |
316 |
| - credentials: ${{ secrets.GKE_SA_KEY }} |
317 |
| - |
318 |
| - - name: install kubectl |
319 |
| - uses: azure/setup-kubectl@v3 |
320 |
| - with: |
321 |
| - version: "v1.23.6" |
322 |
| - id: install |
323 |
| - |
324 |
| - - name: Deploy Care Fe Production |
325 |
| - run: | |
326 |
| - mkdir -p $HOME/.kube/ |
327 |
| - cd kube/deployments/ |
328 |
| - sed -i -e "s/_BUILD_NUMBER_/${GITHUB_RUN_NUMBER}/g" care-fe.yaml |
329 |
| - kubectl apply -f care-fe.yaml |
330 |
| -
|
331 |
| - deploy-production-assam: |
332 |
| - needs: notify-release |
333 |
| - name: Deploy to GKE Assam |
334 |
| - runs-on: ubuntu-latest |
335 |
| - environment: |
336 |
| - name: Production-Assam |
337 |
| - url: https://care.assam.gov.in |
338 |
| - steps: |
339 |
| - - name: Checkout Kube Config |
340 |
| - uses: actions/checkout@v3 |
341 |
| - with: |
342 |
| - repository: coronasafe/as-care-infra |
343 |
| - token: ${{ secrets.GIT_ACCESS_TOKEN }} |
344 |
| - path: kube |
345 |
| - ref: main |
346 |
| - |
347 |
| - - uses: actions/setup-node@v3 |
348 |
| - with: |
349 |
| - node-version: '20' |
350 |
| - |
351 |
| - # Setup gcloud CLI |
352 |
| - - uses: google-github-actions/setup-gcloud@94337306dda8180d967a56932ceb4ddcf01edae7 |
353 |
| - with: |
354 |
| - service_account_key: ${{ secrets.GKE_SA_KEY }} |
355 |
| - project_id: ${{ secrets.GKE_PROJECT }} |
356 |
| - |
357 |
| - # Get the GKE credentials so we can deploy to the cluster |
358 |
| - - uses: google-github-actions/get-gke-credentials@fb08709ba27618c31c09e014e1d8364b02e5042e |
359 |
| - with: |
360 |
| - cluster_name: ${{ secrets.GKE_CLUSTER }} |
361 |
| - location: ${{ secrets.GKE_ZONE }} |
362 |
| - credentials: ${{ secrets.GKE_SA_KEY }} |
363 |
| - |
364 |
| - - name: install kubectl |
365 |
| - uses: azure/setup-kubectl@v3 |
366 |
| - with: |
367 |
| - version: "v1.23.6" |
368 |
| - id: install |
369 |
| - |
370 |
| - - name: Deploy Care Fe Production |
371 |
| - run: | |
372 |
| - mkdir -p $HOME/.kube/ |
373 |
| - cd kube/deployments/ |
374 |
| - sed -i -e "s/_BUILD_NUMBER_/${GITHUB_RUN_NUMBER}/g" care-fe.yaml |
375 |
| - kubectl apply -f care-fe.yaml |
376 |
| -
|
377 |
| - deploy-production-nagaland: |
378 |
| - needs: notify-release |
379 |
| - name: Deploy to GKE Nagaland |
380 |
| - runs-on: ubuntu-latest |
381 |
| - environment: |
382 |
| - name: Production - Nagaland |
383 |
| - url: https://care.nagaland.gov.in |
384 |
| - steps: |
385 |
| - - name: Checkout Kube Config |
386 |
| - uses: actions/checkout@v3 |
387 |
| - with: |
388 |
| - repository: coronasafe/nl-care-infra |
389 |
| - token: ${{ secrets.GIT_ACCESS_TOKEN }} |
390 |
| - path: kube |
391 |
| - ref: main |
392 |
| - |
393 |
| - - uses: actions/setup-node@v3 |
394 |
| - with: |
395 |
| - node-version: '20' |
396 |
| - |
397 |
| - # Setup gcloud CLI |
398 |
| - - uses: google-github-actions/setup-gcloud@94337306dda8180d967a56932ceb4ddcf01edae7 |
399 |
| - with: |
400 |
| - service_account_key: ${{ secrets.GKE_SA_KEY }} |
401 |
| - project_id: ${{ secrets.GKE_PROJECT }} |
402 |
| - |
403 |
| - # Get the GKE credentials, so we can deploy to the cluster |
404 |
| - - uses: google-github-actions/get-gke-credentials@fb08709ba27618c31c09e014e1d8364b02e5042e |
405 |
| - with: |
406 |
| - cluster_name: ${{ secrets.GKE_CLUSTER }} |
407 |
| - location: ${{ secrets.GKE_ZONE }} |
408 |
| - credentials: ${{ secrets.GKE_SA_KEY }} |
409 |
| - |
410 |
| - - name: install kubectl |
411 |
| - uses: azure/setup-kubectl@v3 |
412 |
| - with: |
413 |
| - version: "v1.23.6" |
414 |
| - id: install |
415 |
| - |
416 |
| - - name: Deploy Care Fe Production |
417 |
| - run: | |
418 |
| - mkdir -p $HOME/.kube/ |
419 |
| - cd kube/deployments/ |
420 |
| - sed -i -e "s/_BUILD_NUMBER_/${GITHUB_RUN_NUMBER}/g" care-fe.yaml |
421 |
| - kubectl apply -f care-fe.yaml |
422 |
| -
|
423 |
| - deploy-production-meghalaya: |
424 |
| - needs: notify-release |
425 |
| - name: Deploy to GKE Meghalaya |
426 |
| - runs-on: ubuntu-latest |
427 |
| - environment: |
428 |
| - name: Production-Meghalaya |
429 |
| - url: https://care.meghealth.gov.in |
430 |
| - steps: |
431 |
| - - name: Checkout Kube Config |
432 |
| - uses: actions/checkout@v3 |
433 |
| - with: |
434 |
| - repository: coronasafe/ml-care-infra |
435 |
| - token: ${{ secrets.GIT_ACCESS_TOKEN }} |
436 |
| - path: kube |
437 |
| - ref: main |
438 |
| - |
439 |
| - - uses: actions/setup-node@v3 |
440 |
| - with: |
441 |
| - node-version: '20' |
442 |
| - |
443 |
| - # Setup gcloud CLI |
444 |
| - - uses: google-github-actions/setup-gcloud@94337306dda8180d967a56932ceb4ddcf01edae7 |
445 |
| - with: |
446 |
| - service_account_key: ${{ secrets.GKE_SA_KEY }} |
447 |
| - project_id: ${{ secrets.GKE_PROJECT }} |
448 |
| - |
449 |
| - # Get the GKE credentials, so we can deploy to the cluster |
450 |
| - - uses: google-github-actions/get-gke-credentials@fb08709ba27618c31c09e014e1d8364b02e5042e |
451 |
| - with: |
452 |
| - cluster_name: ${{ secrets.GKE_CLUSTER }} |
453 |
| - location: ${{ secrets.GKE_ZONE }} |
454 |
| - credentials: ${{ secrets.GKE_SA_KEY }} |
455 |
| - |
456 |
| - - name: install kubectl |
457 |
| - uses: azure/setup-kubectl@v3 |
458 |
| - with: |
459 |
| - version: "v1.23.6" |
460 |
| - id: install |
461 |
| - |
462 |
| - - name: Deploy Care Fe Production |
| 155 | + - name: Trigger deploy |
463 | 156 | run: |
|
464 |
| - mkdir -p $HOME/.kube/ |
465 |
| - cd kube/deployments/ |
466 |
| - sed -i -e "s/_BUILD_NUMBER_/${GITHUB_RUN_NUMBER}/g" care-fe.yaml |
467 |
| - kubectl apply -f care-fe.yaml |
| 157 | + COMMIT_SHA=${{ github.sha }} |
| 158 | + JSON='{ "substitutions": { "care_be_tag":"", "care_fe_tag": "'"$COMMIT_SHA"'", "metabase_tag": "" } }' |
| 159 | + curl --location "${{ secrets.STAGING_GCP_DEPLOY_URL }}" \ |
| 160 | + --header 'Content-Type: application/json' --data "$JSON" |
0 commit comments