Skip to content

Commit 2345c81

Browse files
committed
support for environments
1 parent c6e5a4b commit 2345c81

2 files changed

Lines changed: 12 additions & 19 deletions

File tree

.github/workflows/_checks-playwright.yaml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,8 @@ on:
5959
required: false
6060
type: boolean
6161
default: false
62-
gcp_wif_provider:
63-
description: "GCP Workload Identity Provider (required if autoinit_env is true)"
64-
required: false
65-
type: string
66-
default: ""
67-
gcp_project_id:
68-
description: "GCP Project ID (required if autoinit_env is true)"
62+
environment:
63+
description: "Environment name to use for accessing environment variables"
6964
required: false
7065
type: string
7166
default: ""
@@ -102,6 +97,7 @@ jobs:
10297
CI: true
10398
HEAD_SHA: ${{ env.HEAD_SHA }}
10499
HEAD_BRANCH_NAME: ${{ env.HEAD_BRANCH_NAME }}
100+
environment: ${{ inputs.environment }}
105101
permissions:
106102
contents: read
107103
id-token: write # Required for Workload Identity Federation
@@ -136,11 +132,11 @@ jobs:
136132
app_pem: ${{ secrets.app_pem }}
137133

138134
- name: Authenticate with GCP
139-
if: ${{ inputs.autoinit_env && inputs.gcp_wif_provider != '' }}
135+
if: ${{ inputs.autoinit_env && inputs.environment != '' }}
140136
uses: zondax/_actions/gcp-wif-auth@main
141137
with:
142-
workload_identity_provider: ${{ inputs.gcp_wif_provider }}
143-
project_id: ${{ inputs.gcp_project_id }}
138+
workload_identity_provider: ${{ vars.PULUMI_FRONTEND_WIF_PROVIDER }}
139+
project_id: ${{ vars.PULUMI_GCP_PROJECT_ID }}
144140

145141
- name: Setup environment variables
146142
if: inputs.use_env_local

.github/workflows/_checks-ts.yaml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,8 @@ on:
8080
description: "Automatically run env:init:ci script after installing dependencies"
8181
type: boolean
8282
default: false
83-
gcp_wif_provider:
84-
description: "GCP Workload Identity Provider (required if autoinit_env is true)"
85-
type: string
86-
default: ""
87-
gcp_project_id:
88-
description: "GCP Project ID (required if autoinit_env is true)"
83+
environment:
84+
description: "Environment name to use for accessing environment variables"
8985
type: string
9086
default: ""
9187
secrets:
@@ -105,6 +101,7 @@ jobs:
105101
container:
106102
image: ${{ inputs.base_image }}
107103
timeout-minutes: 15
104+
environment: ${{ inputs.environment }}
108105
permissions:
109106
contents: read
110107
id-token: write # Required for Workload Identity Federation
@@ -129,11 +126,11 @@ jobs:
129126
app_pem: ${{ secrets.app_pem }}
130127

131128
- name: Authenticate with GCP
132-
if: ${{ inputs.autoinit_env && inputs.gcp_wif_provider != '' }}
129+
if: ${{ inputs.autoinit_env && inputs.environment != '' }}
133130
uses: zondax/_actions/gcp-wif-auth@main
134131
with:
135-
workload_identity_provider: ${{ inputs.gcp_wif_provider }}
136-
project_id: ${{ inputs.gcp_project_id }}
132+
workload_identity_provider: ${{ vars.PULUMI_FRONTEND_WIF_PROVIDER }}
133+
project_id: ${{ vars.PULUMI_GCP_PROJECT_ID }}
137134

138135
- name: Setup Node.js Environment
139136
id: setup-node

0 commit comments

Comments
 (0)