From a6344e0eedf82ae9486c4f54900c166e45172449 Mon Sep 17 00:00:00 2001 From: sjonpaulbrown Date: Mon, 24 Jun 2024 14:45:33 -0600 Subject: [PATCH] Update workflow to use inputs to local action --- .../test-monitor-process-results/action.yml | 12 ++++++++++-- .github/workflows/flaky-test-monitor.yml | 18 +++++++++--------- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/.github/workflows/actions/test-monitor-process-results/action.yml b/.github/workflows/actions/test-monitor-process-results/action.yml index cccde2862a9..387a362bb3e 100644 --- a/.github/workflows/actions/test-monitor-process-results/action.yml +++ b/.github/workflows/actions/test-monitor-process-results/action.yml @@ -2,6 +2,14 @@ name: Test Monitor - Process Results description: Custom action that's used in multiple Flaky Test Monitor jobs to process test results and upload them to BigQuery +inputs: + service_account: + description: 'The GCP Service Account' + required: true + workload_identity_provider: + description: 'The GCP Workload Identity Provider' + required: true + runs: using : "composite" steps: @@ -23,9 +31,9 @@ runs: id: auth uses: google-github-actions/auth@v2 with: + service_account: ${{ inputs.service_account }} token_format: 'access_token' - workload_identity_provider: ${{ secrets.FLAKY_TEST_WORKLOAD_IDENTITY_PROVIDER }} - service_account: ${{ secrets.FLAKY_TEST_SERVICE_ACCOUNT }} + workload_identity_provider: ${{ inputs.workload_identity_provider }} - name: Upload results to BigQuery (skipped tests) uses: nick-fields/retry@v2 with: diff --git a/.github/workflows/flaky-test-monitor.yml b/.github/workflows/flaky-test-monitor.yml index 342cb584d5f..39c9be9c2e6 100644 --- a/.github/workflows/flaky-test-monitor.yml +++ b/.github/workflows/flaky-test-monitor.yml @@ -74,9 +74,9 @@ jobs: env: TEST_CATEGORY: unit uses: ./.github/workflows/actions/test-monitor-process-results - secrets: - FLAKY_TEST_WORKLOAD_IDENTITY_PROVIDER: ${{ secrets.FLAKY_TEST_WORKLOAD_IDENTITY_PROVIDER }} - FLAKY_TEST_SERVICE_ACCOUNT: ${{ secrets.FLAKY_TEST_SERVICE_ACCOUNT }} + with: + service_account: ${{ secrets.FLAKY_TEST_SERVICE_ACCOUNT }} + workload_identity_provider: ${{ secrets.FLAKY_TEST_WORKLOAD_IDENTITY_PROVIDER }} unit-test-modules: name: Unit Tests (Modules) @@ -117,9 +117,9 @@ jobs: env: TEST_CATEGORY: ${{ matrix.test_category }} uses: ./.github/workflows/actions/test-monitor-process-results - secrets: - FLAKY_TEST_WORKLOAD_IDENTITY_PROVIDER: ${{ secrets.FLAKY_TEST_WORKLOAD_IDENTITY_PROVIDER }} - FLAKY_TEST_SERVICE_ACCOUNT: ${{ secrets.FLAKY_TEST_SERVICE_ACCOUNT }} + with: + service_account: ${{ secrets.FLAKY_TEST_SERVICE_ACCOUNT }} + workload_identity_provider: ${{ secrets.FLAKY_TEST_WORKLOAD_IDENTITY_PROVIDER }} integration-test: name: Integration Tests @@ -178,7 +178,7 @@ jobs: env: TEST_CATEGORY: ${{ matrix.test_category }} uses: ./.github/workflows/actions/test-monitor-process-results - secrets: - FLAKY_TEST_WORKLOAD_IDENTITY_PROVIDER: ${{ secrets.FLAKY_TEST_WORKLOAD_IDENTITY_PROVIDER }} - FLAKY_TEST_SERVICE_ACCOUNT: ${{ secrets.FLAKY_TEST_SERVICE_ACCOUNT }} + with: + service_account: ${{ secrets.FLAKY_TEST_SERVICE_ACCOUNT }} + workload_identity_provider: ${{ secrets.FLAKY_TEST_WORKLOAD_IDENTITY_PROVIDER }}