Skip to content

Commit a112435

Browse files
Use key-pair authentication
1 parent 0145775 commit a112435

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

.github/workflows/deploy_pipeline.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,18 @@ jobs:
4141

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

0 commit comments

Comments
 (0)