-
Notifications
You must be signed in to change notification settings - Fork 70
49 lines (39 loc) · 1.28 KB
/
deploy-online-boutique.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
name: Deploy Online Boutique
on:
workflow_dispatch:
inputs:
workflowAction:
description: 'Action'
default: 'Deploy Online Boutique'
required: true
env:
GCP_PROJECT: ${{ secrets.GCP_PROJECT }}
GCP_SA_KEY: ${{ secrets.GCP_SA_KEY }}
GKE_CREATE: true
APPL_DEPLOY: true
APPL_DELETE: false
GKE_DELETE: false
jobs:
deploy-online-boutique:
runs-on: ubuntu-latest
steps:
- name: Check env vars & requested action
#https://github.blog/changelog/2020-07-06-github-actions-manual-triggers-with-workflow_dispatch/
run: |-
echo "requested action: ${{ github.event.inputs.workflowAction }}"
echo '### env variables:'
echo "gcp project: $GCP_PROJECT"
echo "gcp sa key: $GCP_SA_KEY"
echo "gke create: $GKE_CREATE"
echo "appl deploy: $APPL_DEPLOY"
echo "appl delete: $APPL_DELETE"
echo "gke delete: $GKE_DELETE"
- name: Checkout
uses: actions/checkout@v2
- name: Setup gcloud CLI
uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
with:
project_id: ${{ secrets.GCP_PROJECT }}
service_account_key: ${{ secrets.GCP_SA_KEY }}
- name: Deploy application on GKE
run: sh/microservices-on-gke.sh