Skip to content

Commit 950896d

Browse files
committed
Attempt to use workload auth token instead of password
1 parent 93134fd commit 950896d

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

.github/workflows/getting_started.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,15 @@ jobs:
2929
runs-on: ${{ matrix.os }}
3030
timeout-minutes: 20
3131

32+
permissions:
33+
id-token: write
34+
contents: read
35+
3236
env:
3337
SNOWFLAKE_ACCOUNT: ${{ secrets.SNOWFLAKE_ACCOUNT }}
3438
SNOWFLAKE_USER: snowddl
35-
SNOWFLAKE_PASSWORD: ${{ secrets.SNOWFLAKE_PASSWORD }}
39+
SNOWFLAKE_AUTHENTICATOR: workload_identity
40+
SNOWFLAKE_WORKLOAD_IDENTITY_PROVIDER: OIDC
3641
SNOWFLAKE_ENV_PREFIX: ${{ matrix.env-prefix }}
3742

3843
steps:
@@ -47,9 +52,15 @@ jobs:
4752
with:
4853
python-version: ${{ matrix.python-version }}
4954

50-
- name: Install
55+
- name: Install SnowDDL
5156
run: pip install -e .
5257

58+
- name: Install Snowflake CLI
59+
run: pip install snowflake-cli
60+
61+
- name: Get Workload Identity Token
62+
run: echo "SNOWFLAKE_WORKLOAD_IDENTITY_TOKEN=$(snow auth oidc read-token --type=github)" >> "$GITHUB_ENV"
63+
5364
- name: "Cleanup"
5465
run: snowddl -c sample01_01 --apply-unsafe destroy
5566

0 commit comments

Comments
 (0)