Skip to content

Commit 8deb7d8

Browse files
authored
Merge pull request #13 from stackql/develop-updates
Develop updates
2 parents 7918b68 + 1292ba4 commit 8deb7d8

1 file changed

Lines changed: 10 additions & 6 deletions

File tree

.github/workflows/setup-stackql.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -97,14 +97,18 @@ jobs:
9797
AUTH: ${{ vars.AUTH }} ##'{ "github": { "type": "basic", "credentialsenvvar": "STACKQL_GITHUB_CREDS" } }'
9898
STACKQL_GITHUB_CREDS: ${{ secrets.STACKQL_GITHUB_CREDS }}
9999

100-
- name: Use Google Provider
100+
- name: Prep Google Creds
101101
env:
102102
GOOGLE_CREDS_ENV: ${{ secrets.GOOGLE_CREDS }}
103-
AUTH: ${{ vars.AUTH }} ## '{ "google": { "type": "service_account", "credentialsfilepath": "sa-key.json" }}'
104103
shell: pwsh
105104
run: | ## use the secret to create json file
106105
$GoogleCreds = [System.Environment]::GetEnvironmentVariable("GOOGLE_CREDS_ENV")
107-
$bytes = [System.Text.Encoding]::UTF8.GetBytes($GoogleCreds)
108-
$base64 = [System.Convert]::ToBase64String($bytes)
109-
Write-Output $base64 | Set-Content sa-key.json
110-
stackql exec -i ./examples/google-example.iql --auth="${AUTH}"
106+
$GoogleCredsDecoded = [System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($GoogleCreds))
107+
Write-Output $GoogleCredsDecoded | Set-Content sa-key.json
108+
109+
- name: Use Google Provider
110+
env:
111+
AUTH: ${{ vars.AUTH }} ## '{ "google": { "type": "service_account", "credentialsfilepath": "sa-key.json" }}'
112+
shell: pwsh
113+
run: | ## use the secret to create json file
114+
stackql exec -i ./examples/google-example.iql --auth='{ "google": { "type": "service_account", "credentialsfilepath": "sa-key.json" }}'

0 commit comments

Comments
 (0)