Skip to content

Commit 34339b8

Browse files
committed
windows fix
1 parent 1292ba4 commit 34339b8

1 file changed

Lines changed: 31 additions & 21 deletions

File tree

.github/workflows/setup-stackql.yml

Lines changed: 31 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,22 @@ jobs:
2929
3030
- name: Use GitHub Provider
3131
run: |
32-
stackql exec -i ./examples/github-example.iql --auth="${AUTH}"
32+
stackql exec -i ./examples/github-example.iql --auth='{ "github": { "type": "basic", "credentialsenvvar": "STACKQL_GITHUB_CREDS" } }'
3333
env:
34-
AUTH: ${{ vars.AUTH }} ##'{ "github": { "type": "basic", "credentialsenvvar": "STACKQL_GITHUB_CREDS" } }'
34+
# AUTH: ${{ vars.AUTH }} ##'{ "github": { "type": "basic", "credentialsenvvar": "STACKQL_GITHUB_CREDS" } }'
3535
STACKQL_GITHUB_CREDS: ${{ secrets.STACKQL_GITHUB_CREDS }}
3636

37-
- name: Use Google Provider
37+
- name: Prep Google Creds (bash)
3838
run: | ## use the secret to create json file
3939
sudo echo ${{ secrets.GOOGLE_CREDS }} | base64 -d > sa-key.json
40-
stackql exec -i ./examples/google-example.iql --auth="${AUTH}"
41-
env:
42-
AUTH: ${{ vars.AUTH }} ## '{ "google": { "type": "service_account", "credentialsfilepath": "sa-key.json" }}'
40+
# stackql exec -i ./examples/google-example.iql --auth='{ "google": { "type": "service_account", "credentialsfilepath": "sa-key.json" }}'
41+
42+
- name: Use Google Provider
43+
run: | ## use the secret to create json file
44+
# sudo echo ${{ secrets.GOOGLE_CREDS }} | base64 -d > sa-key.json
45+
stackql exec -i ./examples/google-example.iql --auth='{ "google": { "type": "service_account", "credentialsfilepath": "sa-key.json" }}'
46+
# env:
47+
# AUTH: ${{ vars.AUTH }} ## '{ "google": { "type": "service_account", "credentialsfilepath": "sa-key.json" }}'
4348

4449
##### uncomment the step to see error handling
4550
# - name: Handle error
@@ -63,17 +68,22 @@ jobs:
6368
6469
- name: Use GitHub Provider
6570
run: |
66-
stackql exec -i ./examples/github-example.iql --auth="${AUTH}"
71+
stackql exec -i ./examples/github-example.iql --auth='{ "github": { "type": "basic", "credentialsenvvar": "STACKQL_GITHUB_CREDS" } }'
6772
env:
68-
AUTH: ${{ vars.AUTH }} ##'{ "github": { "type": "basic", "credentialsenvvar": "STACKQL_GITHUB_CREDS" } }'
73+
# AUTH: ${{ vars.AUTH }} ##'{ "github": { "type": "basic", "credentialsenvvar": "STACKQL_GITHUB_CREDS" } }'
6974
STACKQL_GITHUB_CREDS: ${{ secrets.STACKQL_GITHUB_CREDS }}
7075

71-
- name: Use Google Provider
76+
- name: Prep Google Creds (bash)
7277
run: | ## use the secret to create json file
7378
sudo echo ${{ secrets.GOOGLE_CREDS }} | base64 -d > sa-key.json
74-
stackql exec -i ./examples/google-example.iql --auth="${AUTH}"
75-
env:
76-
AUTH: ${{ vars.AUTH }} ## '{ "google": { "type": "service_account", "credentialsfilepath": "sa-key.json" }}'
79+
# stackql exec -i ./examples/google-example.iql --auth='{ "google": { "type": "service_account", "credentialsfilepath": "sa-key.json" }}'
80+
81+
- name: Use Google Provider
82+
run: | ## use the secret to create json file
83+
# sudo echo ${{ secrets.GOOGLE_CREDS }} | base64 -d > sa-key.json
84+
stackql exec -i ./examples/google-example.iql --auth='{ "google": { "type": "service_account", "credentialsfilepath": "sa-key.json" }}'
85+
# env:
86+
# AUTH: ${{ vars.AUTH }} ## '{ "google": { "type": "service_account", "credentialsfilepath": "sa-key.json" }}'
7787

7888
stackql-tests-windows:
7989
name: 'Stackql Tests (Windows)'
@@ -92,23 +102,23 @@ jobs:
92102
93103
- name: Use GitHub Provider
94104
run: |
95-
stackql exec -i ./examples/github-example.iql --auth="${AUTH}"
105+
stackql exec -i ./examples/github-example.iql --auth='{ "github": { "type": "basic", "credentialsenvvar": "STACKQL_GITHUB_CREDS" } }'
96106
env:
97-
AUTH: ${{ vars.AUTH }} ##'{ "github": { "type": "basic", "credentialsenvvar": "STACKQL_GITHUB_CREDS" } }'
107+
# AUTH: ${{ vars.AUTH }} ##'{ "github": { "type": "basic", "credentialsenvvar": "STACKQL_GITHUB_CREDS" } }'
98108
STACKQL_GITHUB_CREDS: ${{ secrets.STACKQL_GITHUB_CREDS }}
99109

100-
- name: Prep Google Creds
101-
env:
102-
GOOGLE_CREDS_ENV: ${{ secrets.GOOGLE_CREDS }}
103-
shell: pwsh
110+
- name: Prep Google Creds (Windows)
104111
run: | ## use the secret to create json file
105112
$GoogleCreds = [System.Environment]::GetEnvironmentVariable("GOOGLE_CREDS_ENV")
106113
$GoogleCredsDecoded = [System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($GoogleCreds))
107114
Write-Output $GoogleCredsDecoded | Set-Content sa-key.json
115+
shell: pwsh
116+
env:
117+
GOOGLE_CREDS_ENV: ${{ secrets.GOOGLE_CREDS }}
108118

109119
- name: Use Google Provider
110-
env:
111-
AUTH: ${{ vars.AUTH }} ## '{ "google": { "type": "service_account", "credentialsfilepath": "sa-key.json" }}'
112-
shell: pwsh
120+
# env:
121+
# AUTH: ${{ vars.AUTH }} ## '{ "google": { "type": "service_account", "credentialsfilepath": "sa-key.json" }}'
122+
# shell: pwsh
113123
run: | ## use the secret to create json file
114124
stackql exec -i ./examples/google-example.iql --auth='{ "google": { "type": "service_account", "credentialsfilepath": "sa-key.json" }}'

0 commit comments

Comments
 (0)