-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (48 loc) · 1.57 KB
/
apply.yaml
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
name: Apply
on:
push:
branches: [main]
workflow_dispatch:
jobs:
apply:
runs-on: ubuntu-latest
env:
GOOGLE_CREDENTIALS: ${{ secrets.CREDENTIALS }}
steps:
- name: Checkout Repo
uses: actions/checkout@v2
- name: Auth GCloud
uses: 'google-github-actions/[email protected]'
with:
credentials_json: ${{ secrets.CREDENTIALS }}
export_environment_variables: true
create_credentials_file: true
- name: Set up Cloud SDK
uses: 'google-github-actions/setup-gcloud@v2'
- name: Use gcloud CLI
run: gcloud container clusters list
- name: Setup Cluster Kubernetes
uses: 'google-github-actions/get-gke-credentials@v2'
with:
cluster_name: ${{ vars.CLUSTER_NAME }}
location: ${{ vars.ZONE }}
- name: Setup Namespace
run: |
kubectl apply -f namespaces.yaml
kubectl config set-context --current --namespace=orderly
- name: apply rabbitmq
working-directory: infra/rabbitmq/
run: kubectl apply -f k8s/
- name: apply API Gateway
working-directory: infra/kong/k8s/
run: |
echo "$(cat configmap.yaml)" | envsubst | kubectl apply -f -
kubectl apply -f deployment.yaml
kubectl apply -f service.yaml
env:
TOKEN_SECRET: ${{ secrets.TOKEN_SECRET }}
- name: apply reverse-proxy
working-directory: infra/nginx/
run: kubectl apply -f k8s/
- name: get services
run: kubectl get svc -o wide