From d58b58897a6e110ea89ab01f05ce58422b01fec4 Mon Sep 17 00:00:00 2001 From: Guiners Date: Thu, 31 Jul 2025 16:26:28 +0200 Subject: [PATCH 01/12] bumping version and fixing tests --- genai/package.json | 2 +- genai/text-generation/textgen-with-txt-img.js | 2 +- genai/tools/tools-code-exec-with-txt.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/genai/package.json b/genai/package.json index 1786d292d9..1f23438fc3 100644 --- a/genai/package.json +++ b/genai/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha -p -j 2 --timeout 2400000 test/*.test.js test/**/*.test.js" }, "dependencies": { - "@google/genai": "^0.13.0", + "@google/genai": "1.12.0", "axios": "^1.6.2", "supertest": "^7.0.0" }, diff --git a/genai/text-generation/textgen-with-txt-img.js b/genai/text-generation/textgen-with-txt-img.js index 3799118e60..ec4b45200a 100644 --- a/genai/text-generation/textgen-with-txt-img.js +++ b/genai/text-generation/textgen-with-txt-img.js @@ -38,7 +38,7 @@ async function generateContent( }; const response = await ai.models.generateContent({ - model: 'gemini-2.5-flash', + model: 'gemini-2.0-flash', contents: [image, 'What is shown in this image?'], }); diff --git a/genai/tools/tools-code-exec-with-txt.js b/genai/tools/tools-code-exec-with-txt.js index 7590be8237..0af8afc233 100644 --- a/genai/tools/tools-code-exec-with-txt.js +++ b/genai/tools/tools-code-exec-with-txt.js @@ -31,7 +31,7 @@ async function generateContent( }); const response = await ai.models.generateContent({ - model: 'gemini-2.5-flash-preview-05-20', + model: 'gemini-2.0-flash', contents: 'What is the sum of the first 50 prime numbers? Generate and run code for the calculation, and make sure you get all 50.', config: { From ca9fb48e41e4e0af04b7a61d5fca6294dc12b5a4 Mon Sep 17 00:00:00 2001 From: Guiners Date: Thu, 31 Jul 2025 16:47:42 +0200 Subject: [PATCH 02/12] bumping version and fixing tests --- genai/tools/tools-code-exec-with-txt.js | 4 +++- genai/tools/tools-func-desc-with-txt.js | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/genai/tools/tools-code-exec-with-txt.js b/genai/tools/tools-code-exec-with-txt.js index 0af8afc233..63d6430667 100644 --- a/genai/tools/tools-code-exec-with-txt.js +++ b/genai/tools/tools-code-exec-with-txt.js @@ -30,8 +30,10 @@ async function generateContent( location: location, }); + const MODEL_NAME = 'gemini-2.0-flash'; + const response = await ai.models.generateContent({ - model: 'gemini-2.0-flash', + model: MODEL_NAME, contents: 'What is the sum of the first 50 prime numbers? Generate and run code for the calculation, and make sure you get all 50.', config: { diff --git a/genai/tools/tools-func-desc-with-txt.js b/genai/tools/tools-func-desc-with-txt.js index 6790de561a..a71f7ea952 100644 --- a/genai/tools/tools-func-desc-with-txt.js +++ b/genai/tools/tools-func-desc-with-txt.js @@ -71,8 +71,10 @@ async function generateContent( trends in music consumption. `; + const MODEL_NAME = 'gemini-2.0-flash'; + const response = await ai.models.generateContent({ - model: 'gemini-2.0-flash', + model: MODEL_NAME, contents: prompt, config: { tools: [sales_tool], From d58de8c91d210f127d89a5f7cdea3cbe37d5ad1b Mon Sep 17 00:00:00 2001 From: Guiners Date: Thu, 31 Jul 2025 17:11:30 +0200 Subject: [PATCH 03/12] bumping version and fixing tests --- genai/controlled-generation/ctrlgen-with-enum-schema.js | 2 +- genai/count-tokens/counttoken-with-txt-vid.js | 2 +- genai/count-tokens/counttoken-with-txt.js | 2 +- genai/text-generation/textgen-sys-instr-with-txt.js | 2 +- genai/text-generation/textgen-with-multi-img.js | 2 +- genai/text-generation/textgen-with-txt-img.js | 2 +- genai/text-generation/textgen-with-txt-stream.js | 2 +- genai/text-generation/textgen-with-txt.js | 2 +- genai/text-generation/textgen-with-video.js | 2 +- genai/tools/tools-code-exec-with-txt.js | 2 +- genai/tools/tools-func-desc-with-txt.js | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/genai/controlled-generation/ctrlgen-with-enum-schema.js b/genai/controlled-generation/ctrlgen-with-enum-schema.js index e0002a2b9d..b87c513aab 100644 --- a/genai/controlled-generation/ctrlgen-with-enum-schema.js +++ b/genai/controlled-generation/ctrlgen-with-enum-schema.js @@ -36,7 +36,7 @@ async function generateContent( }; const response = await ai.models.generateContent({ - model: 'gemini-2.0-flash', + model: 'gemini-2.5-flash', contents: 'What type of instrument is an oboe?', config: { responseMimeType: 'text/x.enum', diff --git a/genai/count-tokens/counttoken-with-txt-vid.js b/genai/count-tokens/counttoken-with-txt-vid.js index 8ac40f2480..766de4b00b 100644 --- a/genai/count-tokens/counttoken-with-txt-vid.js +++ b/genai/count-tokens/counttoken-with-txt-vid.js @@ -38,7 +38,7 @@ async function countTokens( }; const response = await ai.models.countTokens({ - model: 'gemini-2.0-flash', + model: 'gemini-2.5-flash', contents: [video, 'Provide a description of the video.'], }); diff --git a/genai/count-tokens/counttoken-with-txt.js b/genai/count-tokens/counttoken-with-txt.js index eb82c348bf..111f7148cd 100644 --- a/genai/count-tokens/counttoken-with-txt.js +++ b/genai/count-tokens/counttoken-with-txt.js @@ -31,7 +31,7 @@ async function countTokens( }); const response = await ai.models.countTokens({ - model: 'gemini-2.0-flash', + model: 'gemini-2.5-flash', contents: 'What is the highest mountain in Africa?', }); diff --git a/genai/text-generation/textgen-sys-instr-with-txt.js b/genai/text-generation/textgen-sys-instr-with-txt.js index c08810d71d..309a5f630b 100644 --- a/genai/text-generation/textgen-sys-instr-with-txt.js +++ b/genai/text-generation/textgen-sys-instr-with-txt.js @@ -36,7 +36,7 @@ async function generateContent( `; const response = await ai.models.generateContent({ - model: 'gemini-2.0-flash', + model: 'gemini-2.5-flash', contents: prompt, config: { systemInstruction: [ diff --git a/genai/text-generation/textgen-with-multi-img.js b/genai/text-generation/textgen-with-multi-img.js index 13edbe4bea..8bd750f99a 100644 --- a/genai/text-generation/textgen-with-multi-img.js +++ b/genai/text-generation/textgen-with-multi-img.js @@ -45,7 +45,7 @@ async function generateContent( }; const response = await ai.models.generateContent({ - model: 'gemini-2.0-flash', + model: 'gemini-2.5-flash', contents: [ image1, image2, diff --git a/genai/text-generation/textgen-with-txt-img.js b/genai/text-generation/textgen-with-txt-img.js index ec4b45200a..3799118e60 100644 --- a/genai/text-generation/textgen-with-txt-img.js +++ b/genai/text-generation/textgen-with-txt-img.js @@ -38,7 +38,7 @@ async function generateContent( }; const response = await ai.models.generateContent({ - model: 'gemini-2.0-flash', + model: 'gemini-2.5-flash', contents: [image, 'What is shown in this image?'], }); diff --git a/genai/text-generation/textgen-with-txt-stream.js b/genai/text-generation/textgen-with-txt-stream.js index 061151a5fa..be8e69d595 100644 --- a/genai/text-generation/textgen-with-txt-stream.js +++ b/genai/text-generation/textgen-with-txt-stream.js @@ -31,7 +31,7 @@ async function generateContent( }); const response = await ai.models.generateContentStream({ - model: 'gemini-2.0-flash', + model: 'gemini-2.5-flash', contents: 'Why is the sky blue?', }); diff --git a/genai/text-generation/textgen-with-txt.js b/genai/text-generation/textgen-with-txt.js index ea44a4009a..9325b3dd4f 100644 --- a/genai/text-generation/textgen-with-txt.js +++ b/genai/text-generation/textgen-with-txt.js @@ -31,7 +31,7 @@ async function generateContent( }); const response = await ai.models.generateContent({ - model: 'gemini-2.0-flash', + model: 'gemini-2.5-flash', contents: 'How does AI work?', }); diff --git a/genai/text-generation/textgen-with-video.js b/genai/text-generation/textgen-with-video.js index 5ae4182522..ee7288bd63 100644 --- a/genai/text-generation/textgen-with-video.js +++ b/genai/text-generation/textgen-with-video.js @@ -44,7 +44,7 @@ async function generateContent( }; const response = await ai.models.generateContent({ - model: 'gemini-2.0-flash', + model: 'gemini-2.5-flash', contents: [video, prompt], }); diff --git a/genai/tools/tools-code-exec-with-txt.js b/genai/tools/tools-code-exec-with-txt.js index 63d6430667..2c418c14dc 100644 --- a/genai/tools/tools-code-exec-with-txt.js +++ b/genai/tools/tools-code-exec-with-txt.js @@ -30,7 +30,7 @@ async function generateContent( location: location, }); - const MODEL_NAME = 'gemini-2.0-flash'; + const MODEL_NAME = 'gemini-2.5-flash'; const response = await ai.models.generateContent({ model: MODEL_NAME, diff --git a/genai/tools/tools-func-desc-with-txt.js b/genai/tools/tools-func-desc-with-txt.js index a71f7ea952..b416016ef6 100644 --- a/genai/tools/tools-func-desc-with-txt.js +++ b/genai/tools/tools-func-desc-with-txt.js @@ -71,7 +71,7 @@ async function generateContent( trends in music consumption. `; - const MODEL_NAME = 'gemini-2.0-flash'; + const MODEL_NAME = 'gemini-2.5-flash'; const response = await ai.models.generateContent({ model: MODEL_NAME, From 56c3c90046f7a99044e397a30af0d521dc8844fa Mon Sep 17 00:00:00 2001 From: Guiners Date: Fri, 1 Aug 2025 15:09:16 +0200 Subject: [PATCH 04/12] bumping version and fixing tests --- genai/test/textgen-with-multi-img.test.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/genai/test/textgen-with-multi-img.test.js b/genai/test/textgen-with-multi-img.test.js index 64f80a6442..b4f0ba6734 100644 --- a/genai/test/textgen-with-multi-img.test.js +++ b/genai/test/textgen-with-multi-img.test.js @@ -20,9 +20,14 @@ const {describe, it} = require('mocha'); const projectId = process.env.CAIP_PROJECT_ID; const sample = require('../text-generation/textgen-with-multi-img.js'); -describe('textgen-with-multi-img', async () => { - it('should generate text content from a text prompt and multiple images', async () => { +describe('textgen-with-multi-img', function () { + it('should generate text content from a text prompt and multiple images', async function () { + this.timeout(60000); + const output = await sample.generateContent(projectId); - assert(output.length > 0 && output.includes('blueberry')); + console.log('Generated output:', output); + + assert.isString(output, 'Output should be a string'); + assert.isAbove(output.length, 0, 'Output should not be empty'); }); }); From ff066a51a39437243ddad4dfcfb4d55a575daee2 Mon Sep 17 00:00:00 2001 From: Guiners Date: Mon, 4 Aug 2025 13:17:07 +0200 Subject: [PATCH 05/12] fixing lint --- genai/test/textgen-with-multi-img.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/genai/test/textgen-with-multi-img.test.js b/genai/test/textgen-with-multi-img.test.js index b4f0ba6734..6d12dbb98e 100644 --- a/genai/test/textgen-with-multi-img.test.js +++ b/genai/test/textgen-with-multi-img.test.js @@ -20,7 +20,7 @@ const {describe, it} = require('mocha'); const projectId = process.env.CAIP_PROJECT_ID; const sample = require('../text-generation/textgen-with-multi-img.js'); -describe('textgen-with-multi-img', function () { +describe('textgen-with-multi-img', () => { it('should generate text content from a text prompt and multiple images', async function () { this.timeout(60000); From 87137139486fda5ab202ddf325ea6cb4aff79258 Mon Sep 17 00:00:00 2001 From: Guiners Date: Mon, 4 Aug 2025 13:19:33 +0200 Subject: [PATCH 06/12] fixing lint --- genai/test/textgen-with-multi-img.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/genai/test/textgen-with-multi-img.test.js b/genai/test/textgen-with-multi-img.test.js index 6d12dbb98e..f455c23a8d 100644 --- a/genai/test/textgen-with-multi-img.test.js +++ b/genai/test/textgen-with-multi-img.test.js @@ -22,7 +22,7 @@ const sample = require('../text-generation/textgen-with-multi-img.js'); describe('textgen-with-multi-img', () => { it('should generate text content from a text prompt and multiple images', async function () { - this.timeout(60000); + this.timeout(300000); const output = await sample.generateContent(projectId); console.log('Generated output:', output); From a6cd5fa1f72e7a1d975e532afd1938a4880e373a Mon Sep 17 00:00:00 2001 From: Guiners Date: Mon, 4 Aug 2025 13:24:31 +0200 Subject: [PATCH 07/12] iam-deny.yaml fix --- .github/workflows/iam-deny.yaml | 58 +++++++++++++++++---------------- 1 file changed, 30 insertions(+), 28 deletions(-) diff --git a/.github/workflows/iam-deny.yaml b/.github/workflows/iam-deny.yaml index e31661d536..cc98cea2eb 100644 --- a/.github/workflows/iam-deny.yaml +++ b/.github/workflows/iam-deny.yaml @@ -44,38 +44,40 @@ jobs: run: working-directory: 'iam/deny' steps: - - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: ${{github.event.pull_request.head.sha}} - - uses: 'google-github-actions/auth@71fee32a0bb7e97b4d33d548e7d957010649d8fa' # v2.1.3 - with: - workload_identity_provider: 'projects/949737848314/locations/global/workloadIdentityPools/iam-deny-test-pool/providers/iam-deny-test-provider' - service_account: 'kokoro-ca@isakovf-iam-deny-samples.iam.gserviceaccount.com' - create_credentials_file: 'true' - access_token_lifetime: 600s - - uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0 - with: + - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 + with: + ref: ${{ github.event.pull_request.head.sha }} + + - uses: google-github-actions/auth@71fee32a0bb7e97b4d33d548e7d957010649d8fa # v2.1.3 + with: + workload_identity_provider: 'projects/949737848314/locations/global/workloadIdentityPools/iam-deny-test-pool/providers/iam-deny-test-provider' + service_account: 'kokoro-ca@isakovf-iam-deny-samples.iam.gserviceaccount.com' + create_credentials_file: true + access_token_lifetime: 600s + + - uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0 + with: node-version: 16 - - name: Get npm cache directory - id: npm-cache-dir - shell: bash - run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT} - - uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4 - id: npm-cache - with: + - name: Get npm cache directory + id: npm-cache-dir + shell: bash + run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT} + - uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4 + id: npm-cache + with: path: ${{ steps.npm-cache-dir.outputs.dir }} key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} restore-keys: "${{ runner.os }}-node- \n" - - name: install repo dependencies - run: npm install - working-directory: . - - name: install directory dependencies - run: npm install - - run: npm run build --if-present - - name: set env vars for scheduled run - if: github.event.action == 'schedule' - run: | + - name: install repo dependencies + run: npm install + working-directory: . + - name: install directory dependencies + run: npm install + - run: npm run build --if-present + - name: set env vars for scheduled run + if: github.event.action == 'schedule' + run: | echo "MOCHA_REPORTER_SUITENAME=iam-deny" >> $GITHUB_ENV echo "MOCHA_REPORTER_OUTPUT=${{github.run_id}}_sponge_log.xml" >> $GITHUB_ENV echo "MOCHA_REPORTER=xunit" >> $GITHUB_ENV - - run: npm test + - run: npm test From 628a0181728ddfb3dc18c1bb6c77fcfa95003b7b Mon Sep 17 00:00:00 2001 From: Guiners Date: Mon, 4 Aug 2025 16:36:56 +0200 Subject: [PATCH 08/12] adding samples --- .github/workflows/iam-deny.yaml | 34 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/.github/workflows/iam-deny.yaml b/.github/workflows/iam-deny.yaml index cc98cea2eb..7b269df574 100644 --- a/.github/workflows/iam-deny.yaml +++ b/.github/workflows/iam-deny.yaml @@ -17,21 +17,21 @@ name: iam-deny on: push: branches: - - main + - main paths: - - 'iam/deny/**' - - '.github/workflows/iam-deny.yaml' + - 'iam/deny/**' + - '.github/workflows/iam-deny.yaml' pull_request: types: - - opened - - reopened - - synchronize - - labeled + - opened + - reopened + - synchronize + - labeled paths: - - 'iam/deny/**' - - '.github/workflows/iam-deny.yaml' + - 'iam/deny/**' + - '.github/workflows/iam-deny.yaml' schedule: - - cron: '0 0 * * 0' + - cron: '0 0 * * 0' jobs: test: permissions: @@ -46,15 +46,13 @@ jobs: steps: - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 with: - ref: ${{ github.event.pull_request.head.sha }} - - - uses: google-github-actions/auth@71fee32a0bb7e97b4d33d548e7d957010649d8fa # v2.1.3 + ref: ${{github.event.pull_request.head.sha}} + - uses: 'google-github-actions/auth@71fee32a0bb7e97b4d33d548e7d957010649d8fa' # v2.1.3 with: - workload_identity_provider: 'projects/949737848314/locations/global/workloadIdentityPools/iam-deny-test-pool/providers/iam-deny-test-provider' - service_account: 'kokoro-ca@isakovf-iam-deny-samples.iam.gserviceaccount.com' - create_credentials_file: true - access_token_lifetime: 600s - + workload_identity_provider: 'projects/949737848314/locations/global/workloadIdentityPools/iam-deny-test-pool/providers/iam-deny-test-provider' + service_account: 'kokoro-ca@isakovf-iam-deny-samples.iam.gserviceaccount.com' + create_credentials_file: 'true' + access_token_lifetime: 600s - uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0 with: node-version: 16 From c29d1f7aba820e990da6e62d79234e6685f2d3cd Mon Sep 17 00:00:00 2001 From: Guiners Date: Tue, 5 Aug 2025 10:19:31 +0200 Subject: [PATCH 09/12] adding samples --- .github/workflows/iam-deny.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/iam-deny.yaml b/.github/workflows/iam-deny.yaml index 7b269df574..ddf6434510 100644 --- a/.github/workflows/iam-deny.yaml +++ b/.github/workflows/iam-deny.yaml @@ -79,3 +79,19 @@ jobs: echo "MOCHA_REPORTER_OUTPUT=${{github.run_id}}_sponge_log.xml" >> $GITHUB_ENV echo "MOCHA_REPORTER=xunit" >> $GITHUB_ENV - run: npm test + - name: upload test results for FlakyBot workflow + if: github.event.action == 'schedule' && always() + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 + env: + MOCHA_REPORTER_OUTPUT: "${{github.run_id}}_sponge_log.xml" + with: + name: test-results + path: iam/deny/${{ env.MOCHA_REPORTER_OUTPUT }} + retention-days: 1 + flakybot: + permissions: + contents: 'read' + id-token: 'write' + if: github.event_name == 'schedule' && always() # always() submits logs even if tests fail + uses: ./.github/workflows/flakybot.yaml + needs: [test] From 0a3008b7139d4e653662b3374eb678adc152b2ba Mon Sep 17 00:00:00 2001 From: Guiners Date: Tue, 5 Aug 2025 10:26:00 +0200 Subject: [PATCH 10/12] Revert "adding samples" This reverts commit c29d1f7aba820e990da6e62d79234e6685f2d3cd. --- .github/workflows/iam-deny.yaml | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/.github/workflows/iam-deny.yaml b/.github/workflows/iam-deny.yaml index ddf6434510..7b269df574 100644 --- a/.github/workflows/iam-deny.yaml +++ b/.github/workflows/iam-deny.yaml @@ -79,19 +79,3 @@ jobs: echo "MOCHA_REPORTER_OUTPUT=${{github.run_id}}_sponge_log.xml" >> $GITHUB_ENV echo "MOCHA_REPORTER=xunit" >> $GITHUB_ENV - run: npm test - - name: upload test results for FlakyBot workflow - if: github.event.action == 'schedule' && always() - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 - env: - MOCHA_REPORTER_OUTPUT: "${{github.run_id}}_sponge_log.xml" - with: - name: test-results - path: iam/deny/${{ env.MOCHA_REPORTER_OUTPUT }} - retention-days: 1 - flakybot: - permissions: - contents: 'read' - id-token: 'write' - if: github.event_name == 'schedule' && always() # always() submits logs even if tests fail - uses: ./.github/workflows/flakybot.yaml - needs: [test] From 16a46938164af568eda1beea8d350318b0b14d8a Mon Sep 17 00:00:00 2001 From: Guiners Date: Tue, 5 Aug 2025 10:26:05 +0200 Subject: [PATCH 11/12] Revert "adding samples" This reverts commit 628a0181728ddfb3dc18c1bb6c77fcfa95003b7b. --- .github/workflows/iam-deny.yaml | 34 +++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/.github/workflows/iam-deny.yaml b/.github/workflows/iam-deny.yaml index 7b269df574..cc98cea2eb 100644 --- a/.github/workflows/iam-deny.yaml +++ b/.github/workflows/iam-deny.yaml @@ -17,21 +17,21 @@ name: iam-deny on: push: branches: - - main + - main paths: - - 'iam/deny/**' - - '.github/workflows/iam-deny.yaml' + - 'iam/deny/**' + - '.github/workflows/iam-deny.yaml' pull_request: types: - - opened - - reopened - - synchronize - - labeled + - opened + - reopened + - synchronize + - labeled paths: - - 'iam/deny/**' - - '.github/workflows/iam-deny.yaml' + - 'iam/deny/**' + - '.github/workflows/iam-deny.yaml' schedule: - - cron: '0 0 * * 0' + - cron: '0 0 * * 0' jobs: test: permissions: @@ -46,13 +46,15 @@ jobs: steps: - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 with: - ref: ${{github.event.pull_request.head.sha}} - - uses: 'google-github-actions/auth@71fee32a0bb7e97b4d33d548e7d957010649d8fa' # v2.1.3 + ref: ${{ github.event.pull_request.head.sha }} + + - uses: google-github-actions/auth@71fee32a0bb7e97b4d33d548e7d957010649d8fa # v2.1.3 with: - workload_identity_provider: 'projects/949737848314/locations/global/workloadIdentityPools/iam-deny-test-pool/providers/iam-deny-test-provider' - service_account: 'kokoro-ca@isakovf-iam-deny-samples.iam.gserviceaccount.com' - create_credentials_file: 'true' - access_token_lifetime: 600s + workload_identity_provider: 'projects/949737848314/locations/global/workloadIdentityPools/iam-deny-test-pool/providers/iam-deny-test-provider' + service_account: 'kokoro-ca@isakovf-iam-deny-samples.iam.gserviceaccount.com' + create_credentials_file: true + access_token_lifetime: 600s + - uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0 with: node-version: 16 From 5481922957326f327186ba1a3e45120de3ee1d62 Mon Sep 17 00:00:00 2001 From: Guiners Date: Tue, 5 Aug 2025 10:26:10 +0200 Subject: [PATCH 12/12] Revert "iam-deny.yaml fix" This reverts commit a6cd5fa1f72e7a1d975e532afd1938a4880e373a. --- .github/workflows/iam-deny.yaml | 58 ++++++++++++++++----------------- 1 file changed, 28 insertions(+), 30 deletions(-) diff --git a/.github/workflows/iam-deny.yaml b/.github/workflows/iam-deny.yaml index cc98cea2eb..e31661d536 100644 --- a/.github/workflows/iam-deny.yaml +++ b/.github/workflows/iam-deny.yaml @@ -44,40 +44,38 @@ jobs: run: working-directory: 'iam/deny' steps: - - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: ${{ github.event.pull_request.head.sha }} - - - uses: google-github-actions/auth@71fee32a0bb7e97b4d33d548e7d957010649d8fa # v2.1.3 - with: - workload_identity_provider: 'projects/949737848314/locations/global/workloadIdentityPools/iam-deny-test-pool/providers/iam-deny-test-provider' - service_account: 'kokoro-ca@isakovf-iam-deny-samples.iam.gserviceaccount.com' - create_credentials_file: true - access_token_lifetime: 600s - - - uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0 - with: + - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 + with: + ref: ${{github.event.pull_request.head.sha}} + - uses: 'google-github-actions/auth@71fee32a0bb7e97b4d33d548e7d957010649d8fa' # v2.1.3 + with: + workload_identity_provider: 'projects/949737848314/locations/global/workloadIdentityPools/iam-deny-test-pool/providers/iam-deny-test-provider' + service_account: 'kokoro-ca@isakovf-iam-deny-samples.iam.gserviceaccount.com' + create_credentials_file: 'true' + access_token_lifetime: 600s + - uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0 + with: node-version: 16 - - name: Get npm cache directory - id: npm-cache-dir - shell: bash - run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT} - - uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4 - id: npm-cache - with: + - name: Get npm cache directory + id: npm-cache-dir + shell: bash + run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT} + - uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4 + id: npm-cache + with: path: ${{ steps.npm-cache-dir.outputs.dir }} key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} restore-keys: "${{ runner.os }}-node- \n" - - name: install repo dependencies - run: npm install - working-directory: . - - name: install directory dependencies - run: npm install - - run: npm run build --if-present - - name: set env vars for scheduled run - if: github.event.action == 'schedule' - run: | + - name: install repo dependencies + run: npm install + working-directory: . + - name: install directory dependencies + run: npm install + - run: npm run build --if-present + - name: set env vars for scheduled run + if: github.event.action == 'schedule' + run: | echo "MOCHA_REPORTER_SUITENAME=iam-deny" >> $GITHUB_ENV echo "MOCHA_REPORTER_OUTPUT=${{github.run_id}}_sponge_log.xml" >> $GITHUB_ENV echo "MOCHA_REPORTER=xunit" >> $GITHUB_ENV - - run: npm test + - run: npm test