Skip to content

Commit eb579fa

Browse files
author
David Cavazos
committed
experiment with env vars
1 parent 052d488 commit eb579fa

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

.github/workflows/ci-dev.yaml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,17 +71,30 @@ jobs:
7171
- uses: actions/checkout@v4
7272
with:
7373
ref: ${{ github.event.pull_request.head.sha }}
74-
- uses: actions/setup-node@v4
74+
- name: Install Node.js ${{ fromJson(env.CI_SETUP).node-version }}
75+
uses: actions/setup-node@v4
7576
with:
7677
node-version: ${{ fromJson(env.CI_SETUP).node-version }}
77-
- uses: google-github-actions/auth@v2
78+
- name: Authenticate
79+
uses: google-github-actions/auth@v2
7880
with:
7981
project_id: ${{ fromJson(env.CI_SETUP).project-id }}
8082
workload_identity_provider: ${{ fromJson(env.CI_SETUP).workload-identity-provider }}
8183
service_account: ${{ fromJson(env.CI_SETUP).service-account }}
8284
access_token_lifetime: ${{ fromJson(env.CI_SETUP).access-token-lifetime }}
83-
- if: fromJson(env.CI_SETUP).secrets != null
85+
- name: Export environment variables
86+
uses: actions/github-script@v7
87+
with:
88+
script: |
89+
console.log("Hello")
90+
// CI_SETUP: ${{ fromJson(env.CI_SETUP) }}
91+
// GOOGLE_SAMPLES_PROJECT: ${{ fromJson(env.CI_SETUP).project }}
92+
console.log(typeof env)
93+
console.log(JSON.stringify(env))
94+
console.log(${{ fromJson(env.CI_SETUP).project }})
95+
- name: Get Secret Manager secrets
8496
uses: google-github-actions/get-secretmanager-secrets@v2
97+
if: fromJson(env.CI_SETUP).secrets != null
8598
with:
8699
secrets: ${{ join(fromJson(env.CI_SETUP).secrets) }}
87100
export_to_environment: true

0 commit comments

Comments
 (0)