Skip to content

Commit 0145775

Browse files
test key-pair auth
1 parent dee748e commit 0145775

File tree

1 file changed

+8
-16
lines changed

1 file changed

+8
-16
lines changed

.github/workflows/deploy_pipeline.yml

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,22 @@ jobs:
1616

1717
env:
1818
REPO_NAME: "quickstart_common.public.quickstart_repo"
19+
SNOWFLAKE_CONNECTIONS_DEFAULT_AUTHENTICATOR: "SNOWFLAKE_JWT"
20+
SNOWFLAKE_CONNECTIONS_DEFAULT_PRIVATE_KEY_FILE: ".snowflake/snowflake_rsa_key"
1921
# Read connection secrets
2022
SNOWFLAKE_CONNECTIONS_DEFAULT_ACCOUNT: ${{ secrets.SNOWFLAKE_ACCOUNT }}
2123
SNOWFLAKE_CONNECTIONS_DEFAULT_USER: ${{ secrets.SNOWFLAKE_USER }}
22-
SNOWFLAKE_CONNECTIONS_DEFAULT_PASSWORD: ${{ secrets.SNOWFLAKE_PASSWORD }}
2324

2425
steps:
2526
# Checkout step is necessary if you want to use a config file from your repo
2627
- name: Checkout repository
2728
uses: actions/checkout@v4
2829

30+
# Write private key secret as file
31+
- name: Configure Private Key
32+
run: |
33+
echo "${{ secrets.SNOWFLAKE_PRIVATE_KEY }}" > .snowflake/snowflake_rsa_key
34+
2935
# Install Snowflake CLI GitHub Action and point to config file
3036
- name: Install snowflake-cli
3137
uses: Snowflake-Labs/[email protected]
@@ -35,18 +41,4 @@ jobs:
3541

3642
# Update Snowflake's copy of the repository
3743
- name: Fetch repository changes
38-
run: snow git fetch "${REPO_NAME}"
39-
40-
# Deploy pipeline with branch specific parameters
41-
- name: Deploy data pipeline to ${{ github.ref_name }}
42-
run: |
43-
BRANCH_NAME=${{ github.ref_name }}
44-
if [ "${BRANCH_NAME}" == "main" ]; then
45-
RETENTION_TIME=1
46-
else
47-
RETENTION_TIME=0
48-
fi
49-
snow git execute \
50-
"@${REPO_NAME}/branches/${BRANCH_NAME}/steps/0[134]_*" \
51-
-D "environment='${BRANCH_NAME}'" \
52-
-D "retention_time=${RETENTION_TIME}"
44+
run: snow connection test

0 commit comments

Comments
 (0)