Skip to content

Commit

Permalink
add in github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasyu888 committed Sep 23, 2023
1 parent be61c30 commit 4b90a77
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Very basic GitHub Action workflow, goes in ~/.github/workflows/deploy.yaml

name: CI

# Controls when the workflow will run
on:
# Triggers the workflow on any branch or tag commit
push:
branches:
- "main"

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
# This workflow contains a single job called "deploy"
deploy:
runs-on: ubuntu-latest

env:
SNOWSQL_PWD: ${{ secrets.SNOWFLAKE_PASSWORD }}
SNOWSQL_ACCOUNT: ${{ secrets.SNOWFLAKE_ACCOUNT }}
SNOWSQL_USER: ${{ secrets.SNOWFLAKE_USERNAME }}
# SNOWSQL_DATABASE: ${{ secrets.SNOWFLAKE_DATABASE }}
# SNOWSQL_SCHEMA: ${{ secrets.SNOWFLAKE_SCHEMA }}
# SNOWSQL_ROLE: ${{ secrets.SNOWFLAKE_ROLE }}
SNOWSQL_WAREHOUSE: ${{ secrets.SNOWFLAKE_WAREHOUSE }}

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4

- name: Install SnowSQL
run: |
curl -O https://sfc-repo.snowflakecomputing.com/snowsql/bootstrap/1.2/linux_x86_64/snowsql-1.2.9-linux_x86_64.bash
SNOWSQL_DEST=~/bin SNOWSQL_LOGIN_SHELL=~/.profile bash snowsql-1.2.9-linux_x86_64.bash
- name: Create or update Stored Procedure
run: |
~/bin/snowsql -f admin/warehouse_setup.sql

0 comments on commit 4b90a77

Please sign in to comment.