Skip to content

Deploy Pipeline

Deploy Pipeline #14

Workflow file for this run

name: Deploy to GCS
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
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