File tree Expand file tree Collapse file tree 4 files changed +11
-3
lines changed
Expand file tree Collapse file tree 4 files changed +11
-3
lines changed Original file line number Diff line number Diff line change 8383 " dlp" , // [ERR_REQUIRE_ESM]: require() of ES Module
8484 " document-ai" , // [ERR_REQUIRE_ESM]: require() of ES Module
8585 " eventarc/audit-storage" , // (untested) Environment Variable 'SERVICE_NAME' not found
86- " eventarc/pubsub" , // (untested) Environment Variable 'SERVICE_NAME' not found
8786 " functions/billing" , // Error: Request failed with status code 500
8887 " functions/http/uploadFile" , // npm error Missing script: "test"
8988 " functions/imagemagick" , // Error: A bucket name is needed to use Cloud Storage
Original file line number Diff line number Diff line change @@ -84,11 +84,13 @@ jobs:
8484 with :
8585 node-version : ${{ fromJson(env.CI_SETUP).node-version }}
8686 - uses : google-github-actions/auth@6fc4af4b145ae7821d527454aa9bd537d1f2dc5f # v2
87+ id : auth
8788 with :
8889 project_id : ${{ env.GOOGLE_SAMPLES_PROJECT }}
8990 workload_identity_provider : projects/1046198160504/locations/global/workloadIdentityPools/github-actions-pool/providers/github-actions-provider
9091 service_account :
[email protected] 9192 access_token_lifetime : 600s # 10 minutes
93+ token_format : ' access_token'
9294 - name : Export environment variables
9395 uses : actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7
9496 id : vars
9799 const { default: setupVars } = await import('${{ github.workspace }}/.github/scripts/setup-vars.js')
98100 const projectId = '${{ env.GOOGLE_SAMPLES_PROJECT }}';
99101 const setup = JSON.parse(process.env.CI_SETUP);
102+ setup['ACCESS_TOKEN'] = '${{steps.auth.outputs.access_token}}';
100103 return await setupVars({projectId, core, setup})
101104 - uses : google-github-actions/get-secretmanager-secrets@e5bb06c2ca53b244f978d33348d18317a7f263ce # v2
102105 if : ${{ fromJson(steps.vars.outputs.result).secrets }}
Original file line number Diff line number Diff line change 1+ {
2+ "env" : {
3+ "SERVICE_NAME" : " eventarc-pubsub-$RUN_ID" ,
4+ "CONTAINER_IMAGE" : " gcr.io/long-door-651/eventarc-pubsub:${RUN_ID}"
5+ }
6+ }
Original file line number Diff line number Diff line change @@ -39,8 +39,8 @@ function cleanup {
3939}
4040trap cleanup EXIT
4141
42- # TODO: Perform authentication inside the test.
43- export ID_TOKEN=$( gcloud auth print-identity-token )
42+
43+ export ID_TOKEN=$ACCESS_TOKEN # DEBUG
4444export BASE_URL=$( test/url.sh)
4545
4646test -z " $BASE_URL " && echo " BASE_URL value is empty" && exit 1
You can’t perform that action at this time.
0 commit comments