Skip to content

Commit

Permalink
experiment with env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
davidcavazos committed Jan 21, 2025
1 parent 052d488 commit eb579fa
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions .github/workflows/ci-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,17 +71,30 @@ jobs:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- uses: actions/setup-node@v4
- name: Install Node.js ${{ fromJson(env.CI_SETUP).node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ fromJson(env.CI_SETUP).node-version }}
- uses: google-github-actions/auth@v2
- name: Authenticate
uses: google-github-actions/auth@v2
with:
project_id: ${{ fromJson(env.CI_SETUP).project-id }}
workload_identity_provider: ${{ fromJson(env.CI_SETUP).workload-identity-provider }}
service_account: ${{ fromJson(env.CI_SETUP).service-account }}
access_token_lifetime: ${{ fromJson(env.CI_SETUP).access-token-lifetime }}
- if: fromJson(env.CI_SETUP).secrets != null
- name: Export environment variables
uses: actions/github-script@v7
with:
script: |
console.log("Hello")
// CI_SETUP: ${{ fromJson(env.CI_SETUP) }}
// GOOGLE_SAMPLES_PROJECT: ${{ fromJson(env.CI_SETUP).project }}
console.log(typeof env)
console.log(JSON.stringify(env))
console.log(${{ fromJson(env.CI_SETUP).project }})
- name: Get Secret Manager secrets
uses: google-github-actions/get-secretmanager-secrets@v2
if: fromJson(env.CI_SETUP).secrets != null
with:
secrets: ${{ join(fromJson(env.CI_SETUP).secrets) }}
export_to_environment: true
Expand Down

0 comments on commit eb579fa

Please sign in to comment.