-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (33 loc) · 1.36 KB
/
deploy.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
name: Deploy Pipeline
on:
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
strategy:
fail-fast: true
env:
GCP_PROJECT_SECRET: ${{ secrets.PROJECT_SECRET }}
GCS_SECRET: ${{ secrets.GCS_SECRET }}
GCS_IAM_SECRET: ${{ secrets.GCS_IAM_SECRET }}
SNOWFLAKE_SECRET: ${{ secrets.SNOWFLAKE_SECRET }}
BQ_SECRET: ${{ secrets.BQ_SECRET }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Google Cloud SDK and auth
uses: 'google-github-actions/auth@v2'
with:
credentials_json: ${{ secrets.GCP_SA_KEY }}
- name: Install SnowSQL and Gcloud Apha
run: |
curl -O "https://sfc-repo.snowflakecomputing.com/snowsql/bootstrap/1.2/linux_x86_64/snowsql-1.2.31-linux_x86_64.bash"
SNOWSQL_DEST=~/bin SNOWSQL_LOGIN_SHELL=~/.profile bash snowsql-1.2.31-linux_x86_64.bash
~/bin/snowsql --version
read -r SNF_ACCOUNT SNF_USERNAME SNF_PASSWORD <<< $(echo "$SNOWFLAKE_SECRET" | tr ',' ' ')
echo "[connections.awesome]
accountname = $SNF_ACCOUNT
username = $SNF_USERNAME
password = $SNF_PASSWORD" > ~/.snowsql/config
- name: Execute deployment script
run: bash resources/Deployment/deployment.sh $GCP_PROJECT_SECRET $GCS_SECRET $GCS_IAM_SECRET $BQ_SECRET