forked from mathieugrasland/Brawlstar-Club-Dashboard
-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (53 loc) · 1.73 KB
/
deploy.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
54
55
56
57
58
59
60
name: Publish to GCP Cloud Functions
on:
push:
branches:
- main
- dev
tags:
- 'v*'
env:
PYTHON_VERSION: "3.9"
DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }}
EXTRACT_RUN_SA: ${{ secrets.EXTRACT_RUN_SA }}
GCP_PROJECT_NUMBER: ${{ secrets.GCP_PROJECT_NUMBER }}
jobs:
deploy:
name: Publish to GCP
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: GCP authentication
uses: google-github-actions/auth@v0.4.0
with:
credentials_json: ${{ env.DEPLOY_TOKEN }}
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v0
- name: Deploy extract_upload_logs Cloud Function
run: |
gcloud functions deploy extract_upload_logs \
--source=./extract_upload_logs \
--entry-point=main \
--runtime=python39 \
--region=europe-west1 \
--service-account=${{ env.EXTRACT_RUN_SA }} \
--max-instances=1 \
--clear-min-instances \
--memory=256MB \
--timeout=540 \
--trigger-topic=extract_upload_logs \
--set-env-vars="PROJECT_NUMBER=${{ env.GCP_PROJECT_NUMBER }}"
- name: Deploy create_table Cloud Function
run: |
gcloud functions deploy create_table \
--source=./create_table \
--entry-point=main \
--runtime=python39 \
--region=europe-west1 \
--service-account=${{ env.EXTRACT_RUN_SA }} \
--max-instances=1 \
--clear-min-instances \
--memory=256MB \
--timeout=540 \
--trigger-topic=create_table \
--set-env-vars="PROJECT_NUMBER=${{ env.GCP_PROJECT_NUMBER }}"