This repository has been archived by the owner on May 4, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
53 lines (49 loc) · 2.1 KB
/
query-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
name: Query Build and Deploy Staging
on:
push:
branches: [develop]
paths:
- "examples/queryServer/**"
- ".github/workflows/query-staging.yaml"
jobs:
build:
runs-on: ubuntu-latest
env:
# Build specific env vars
CONFIG_ID: staging
CONFIG_ZMQ_ENDPOINT: ${{ secrets.STAGING_CONFIG_ZMQ_ENDPOINT }}
CONFIG_DB_URL: ${{ secrets.STAGING_CONFIG_DB_URL }}
GCP_SERVICE_ID: ${{ secrets.GCP_QUERY_STAGING_SERVICE_ID }}
GCP_API_STAGING_DOMAIN: ${{ secrets.GCP_API_STAGING_DOMAIN }}
GCP_API_STAGING_SERVICE_ID: ${{ secrets.GCP_API_STAGING_SERVICE_ID }}
GCP_QUERY_STAGING_DOMAIN: ${{ secrets.GCP_QUERY_STAGING_DOMAIN }}
GCP_QUERY_STAGING_SERVICE_ID: ${{ secrets.GCP_QUERY_STAGING_SERVICE_ID }}
steps:
- uses: actions/checkout@v2
- name: Query Config
run: |
cd examples/queryServer/
mv .env.example .env
sed -i 's/DB-URL/${{ env.CONFIG_DB_URL }}/g' .env
sed -i 's/ZMQ-ENDPOINT/${{ env.CONFIG_ZMQ_ENDPOINT }}/g' .env
- name: GCP Config
run: |
cd examples/queryServer
mv app.template.yaml app.yaml
sed -i 's/%SERVICE-ID%/${{ env.GCP_SERVICE_ID }}/g' app.yaml
sed -i 's/%CONFIG-ID%/${{ env.CONFIG_ID }}/g' app.yaml
mv dispatch.template.yaml dispatch.yaml
sed -i 's/%GCP-STAGING-API-DOMAIN%/${{ env.GCP_API_STAGING_DOMAIN }}/g' dispatch.yaml
sed -i 's/%GCP-STAGING-API-SERVICE-ID%/${{ env.GCP_API_STAGING_SERVICE_ID }}/g' dispatch.yaml
sed -i 's/%GCP-STAGING-QUERY-DOMAIN%/${{ env.GCP_QUERY_STAGING_DOMAIN }}/g' dispatch.yaml
sed -i 's/%GCP-STAGING-QUERY-SERVICE-ID%/${{ env.GCP_QUERY_STAGING_SERVICE_ID }}/g' dispatch.yaml
- uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
with:
version: latest
project_id: ${{ secrets.GCP_PROJECT_ID }}
service_account_key: ${{ secrets.GCP_SA_KEY }}
export_default_credentials: true
- name: Deploy
run: |
cd examples/queryServer
gcloud app deploy app.yaml dispatch.yaml --quiet