forked from didier-durand/microservices-on-cloud-kubernetes
-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (41 loc) · 1.32 KB
/
microservices-on-gke.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
name: Microservices on GKE
on:
workflow_dispatch:
inputs:
workflowAction:
description: 'Action'
default: 'Full Cycle for Online Boutique'
required: true
schedule:
- cron: '33 3 * * THU'
env:
GCP_PROJECT: ${{ secrets.GCP_PROJECT }}
GCP_SA_KEY: ${{ secrets.GCP_SA_KEY }}
GKE_CREATE: true
APPL_DEPLOY: true
APPL_DELETE: true
GKE_DELETE: true
jobs:
microservices-on-gke:
runs-on: ubuntu-20.04
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: google-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