@@ -112,140 +112,140 @@ jobs:
112112 gcloud secrets versions access "latest" --secret "${{ vars.SECRET_NAME }}"
113113
114114
115- #
116- # Workload Identity Federation through a Service Account
117- #
118- workload_identity_federation_through_service_account :
119- if : ${{ github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name }}
120- name : ' workload_identity_federation_through_service_account'
121- runs-on : ' ${{ matrix.os }}'
122- strategy :
123- fail-fast : false
124- matrix :
125- os :
126- - ' ubuntu-latest'
127- - ' windows-latest'
128- - ' macos-latest'
129-
130- permissions :
131- id-token : ' write'
132-
133- steps :
134- - uses : ' actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683' # ratchet:actions/checkout@v4
135-
136- - uses : ' actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a' # ratchet:actions/setup-node@v4
137- with :
138- node-version : ' 20.x'
139-
140- - name : ' npm build'
141- run : ' npm ci && npm run build'
142-
143- - id : ' auth-default'
144- name : ' auth-default'
145- uses : ' ./'
146- with :
147- workload_identity_provider : ' ${{ vars.WIF_PROVIDER_NAME }}'
148- service_account : ' ${{ vars.SERVICE_ACCOUNT_EMAIL }}'
149-
150- - uses : ' google-github-actions/setup-gcloud@main' # ratchet:exclude
151- with :
152- version : ' >= 363.0.0'
153-
154- - name : ' gcloud'
155- run : |-
156- gcloud secrets versions access "latest" --secret "${{ vars.SECRET_NAME }}"
157-
158- - id : ' auth-access-token'
159- name : ' auth-access-token'
160- uses : ' ./'
161- with :
162- workload_identity_provider : ' ${{ vars.WIF_PROVIDER_NAME }}'
163- service_account : ' ${{ vars.SERVICE_ACCOUNT_EMAIL }}'
164- token_format : ' access_token'
165-
166- - id : ' oauth-token'
167- name : ' oauth-token'
168- run : |-
169- curl https://secretmanager.googleapis.com/v1/projects/${{ steps.auth-access-token.outputs.project_id }}/secrets/${{ vars.SECRET_NAME }}/versions/latest:access \
170- --silent \
171- --show-error \
172- --fail \
173- --header "Authorization: Bearer ${{ steps.auth-access-token.outputs.access_token }}"
174-
175- - id : ' id-token'
176- name : ' id-token'
177- uses : ' ./'
178- with :
179- workload_identity_provider : ' ${{ vars.WIF_PROVIDER_NAME }}'
180- service_account : ' ${{ vars.SERVICE_ACCOUNT_EMAIL }}'
181- token_format : ' id_token'
182- id_token_audience : ' https://secretmanager.googleapis.com/'
183- id_token_include_email : true
184-
185-
186- #
187- # Service Account Key JSON
188- #
189- credentials_json :
190- if : ${{ github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name }}
191- name : ' credentials_json'
192- runs-on : ' ${{ matrix.os }}'
193- strategy :
194- fail-fast : false
195- matrix :
196- os :
197- - ' ubuntu-latest'
198- - ' windows-latest'
199- - ' macos-latest'
200-
201- steps :
202- - uses : ' actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683' # ratchet:actions/checkout@v4
203-
204- - uses : ' actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a' # ratchet:actions/setup-node@v4
205- with :
206- node-version : ' 20.x'
207-
208- - name : ' npm build'
209- run : ' npm ci && npm run build'
210-
211- - id : ' auth-default'
212- name : ' auth-default'
213- uses : ' ./'
214- with :
215- credentials_json : ' ${{ secrets.SERVICE_ACCOUNT_KEY_JSON }}'
216-
217- - uses : ' google-github-actions/setup-gcloud@main' # ratchet:exclude
218- with :
219- version : ' >= 363.0.0'
220-
221- - name : ' gcloud'
222- run : |-
223- gcloud secrets versions access "latest" --secret "${{ vars.SECRET_NAME }}"
224-
225- - id : ' auth-access-token'
226- name : ' auth-access-token'
227- uses : ' ./'
228- with :
229- credentials_json : ' ${{ secrets.SERVICE_ACCOUNT_KEY_JSON }}'
230- token_format : ' access_token'
231-
232- - id : ' access-token'
233- name : ' access-token'
234- run : |-
235- curl https://secretmanager.googleapis.com/v1/projects/${{ steps.auth-access-token.outputs.project_id }}/secrets/${{ vars.SECRET_NAME }}/versions/latest:access \
236- --silent \
237- --show-error \
238- --fail \
239- --header "Authorization: Bearer ${{ steps.auth-access-token.outputs.access_token }}"
240-
241- - id : ' auth-id-token'
242- name : ' auth-id-token'
243- uses : ' ./'
244- with :
245- credentials_json : ' ${{ secrets.SERVICE_ACCOUNT_KEY_JSON }}'
246- token_format : ' id_token'
247- id_token_audience : ' https://secretmanager.googleapis.com/'
248- id_token_include_email : true
115+ # #
116+ # # Workload Identity Federation through a Service Account
117+ # #
118+ # workload_identity_federation_through_service_account:
119+ # if: ${{ github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name }}
120+ # name: 'workload_identity_federation_through_service_account'
121+ # runs-on: '${{ matrix.os }}'
122+ # strategy:
123+ # fail-fast: false
124+ # matrix:
125+ # os:
126+ # - 'ubuntu-latest'
127+ # - 'windows-latest'
128+ # - 'macos-latest'
129+
130+ # permissions:
131+ # id-token: 'write'
132+
133+ # steps:
134+ # - uses: 'actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683' # ratchet:actions/checkout@v4
135+
136+ # - uses: 'actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a' # ratchet:actions/setup-node@v4
137+ # with:
138+ # node-version: '20.x'
139+
140+ # - name: 'npm build'
141+ # run: 'npm ci && npm run build'
142+
143+ # - id: 'auth-default'
144+ # name: 'auth-default'
145+ # uses: './'
146+ # with:
147+ # workload_identity_provider: '${{ vars.WIF_PROVIDER_NAME }}'
148+ # service_account: '${{ vars.SERVICE_ACCOUNT_EMAIL }}'
149+
150+ # - uses: 'google-github-actions/setup-gcloud@main' # ratchet:exclude
151+ # with:
152+ # version: '>= 363.0.0'
153+
154+ # - name: 'gcloud'
155+ # run: |-
156+ # gcloud secrets versions access "latest" --secret "${{ vars.SECRET_NAME }}"
157+
158+ # - id: 'auth-access-token'
159+ # name: 'auth-access-token'
160+ # uses: './'
161+ # with:
162+ # workload_identity_provider: '${{ vars.WIF_PROVIDER_NAME }}'
163+ # service_account: '${{ vars.SERVICE_ACCOUNT_EMAIL }}'
164+ # token_format: 'access_token'
165+
166+ # - id: 'oauth-token'
167+ # name: 'oauth-token'
168+ # run: |-
169+ # curl https://secretmanager.googleapis.com/v1/projects/${{ steps.auth-access-token.outputs.project_id }}/secrets/${{ vars.SECRET_NAME }}/versions/latest:access \
170+ # --silent \
171+ # --show-error \
172+ # --fail \
173+ # --header "Authorization: Bearer ${{ steps.auth-access-token.outputs.access_token }}"
174+
175+ # - id: 'id-token'
176+ # name: 'id-token'
177+ # uses: './'
178+ # with:
179+ # workload_identity_provider: '${{ vars.WIF_PROVIDER_NAME }}'
180+ # service_account: '${{ vars.SERVICE_ACCOUNT_EMAIL }}'
181+ # token_format: 'id_token'
182+ # id_token_audience: 'https://secretmanager.googleapis.com/'
183+ # id_token_include_email: true
184+
185+
186+ # #
187+ # # Service Account Key JSON
188+ # #
189+ # credentials_json:
190+ # if: ${{ github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name }}
191+ # name: 'credentials_json'
192+ # runs-on: '${{ matrix.os }}'
193+ # strategy:
194+ # fail-fast: false
195+ # matrix:
196+ # os:
197+ # - 'ubuntu-latest'
198+ # - 'windows-latest'
199+ # - 'macos-latest'
200+
201+ # steps:
202+ # - uses: 'actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683' # ratchet:actions/checkout@v4
203+
204+ # - uses: 'actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a' # ratchet:actions/setup-node@v4
205+ # with:
206+ # node-version: '20.x'
207+
208+ # - name: 'npm build'
209+ # run: 'npm ci && npm run build'
210+
211+ # - id: 'auth-default'
212+ # name: 'auth-default'
213+ # uses: './'
214+ # with:
215+ # credentials_json: '${{ secrets.SERVICE_ACCOUNT_KEY_JSON }}'
216+
217+ # - uses: 'google-github-actions/setup-gcloud@main' # ratchet:exclude
218+ # with:
219+ # version: '>= 363.0.0'
220+
221+ # - name: 'gcloud'
222+ # run: |-
223+ # gcloud secrets versions access "latest" --secret "${{ vars.SECRET_NAME }}"
224+
225+ # - id: 'auth-access-token'
226+ # name: 'auth-access-token'
227+ # uses: './'
228+ # with:
229+ # credentials_json: '${{ secrets.SERVICE_ACCOUNT_KEY_JSON }}'
230+ # token_format: 'access_token'
231+
232+ # - id: 'access-token'
233+ # name: 'access-token'
234+ # run: |-
235+ # curl https://secretmanager.googleapis.com/v1/projects/${{ steps.auth-access-token.outputs.project_id }}/secrets/${{ vars.SECRET_NAME }}/versions/latest:access \
236+ # --silent \
237+ # --show-error \
238+ # --fail \
239+ # --header "Authorization: Bearer ${{ steps.auth-access-token.outputs.access_token }}"
240+
241+ # - id: 'auth-id-token'
242+ # name: 'auth-id-token'
243+ # uses: './'
244+ # with:
245+ # credentials_json: '${{ secrets.SERVICE_ACCOUNT_KEY_JSON }}'
246+ # token_format: 'id_token'
247+ # id_token_audience: 'https://secretmanager.googleapis.com/'
248+ # id_token_include_email: true
249249
250250 #
251251 # This test ensures that the GOOGLE_APPLICATION_CREDENTIALS environment
0 commit comments