-
Notifications
You must be signed in to change notification settings - Fork 1
65 lines (51 loc) · 1.98 KB
/
staging.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
61
62
63
64
65
name: Staging
on:
push:
branches:
- "master"
env:
COMPONENT: bot-telegram
VERSION: latest
CHART_VERSION: 0.0.0
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Registry login
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_ACCESS_TOKEN }}
- name: Staging
run: make staging
- name: Set up Helm
uses: azure/setup-helm@v1
with:
version: v3.12.0
- name: Helm Lint
run: |
helm lint helm/${COMPONENT}
- name: Helm Package
run: |
helm dependency update helm/${COMPONENT}
helm package helm/${COMPONENT}
- name: Google Cloud Auth
uses: 'google-github-actions/auth@v1'
with:
credentials_json: '${{ secrets.GKE_SA_KEY }}'
- uses: google-github-actions/setup-gcloud@v1
with:
project_id: ${{ secrets.GKE_RPOJECT_ID }}
- name: Kubeconfig
run: |
gcloud components install gke-gcloud-auth-plugin
gcloud container clusters get-credentials ${{ secrets.GKE_CLUSTER_NAME_DEMO }} \
--region ${{ secrets.GKE_CLUSTER_REGION }} \
--project ${{ secrets.GKE_PROJECT_ID }}
- name: Helm Upgrade
run: |
helm upgrade --install ${COMPONENT} ${COMPONENT}-0.0.0.tgz \
--values helm/bot-telegram/values-gke-cluster-0.yaml \
--set podAnnotations.commit=$(git rev-parse --short HEAD),api.telegram.support.chat.id=${{ secrets.TG_BOT_SUPPORT_CHAT_ID }},api.telegram.webhook.token=${{ secrets.API_TELEGRAM_WEBHOOK_TOKEN }},chats.db.password.secret.enabled=false,chats.db.protocol=mongodb+srv,chats.db.tls.enabled=true,chats.db.tls.insecure=true,chats.db.hostname=${{ secrets.DB_HOST_DEMO }},chats.db.username=${{ secrets.DB_USERNAME_DEMO }},chats.db.password.raw=${{ secrets.DB_PASSWORD_DEMO }}