From 325f5134dffdce7894fbb0c8a0790bf26ae45a82 Mon Sep 17 00:00:00 2001 From: Min Zhu Date: Thu, 30 Nov 2023 15:49:17 -0500 Subject: [PATCH] chore: upgrade github action setup-gcloud to v1 (#2389) Followup to comment [here](https://github.com/GoogleCloudPlatform/spring-cloud-gcp/pull/2384#discussion_r1409865100), upgrades `google-github-actions/setup-gcloud` to be consistent with [nativeTests.yaml](https://github.com/GoogleCloudPlatform/spring-cloud-gcp/blob/main/.github/workflows/NativeTests.yaml) following example [here](https://github.com/google-github-actions/setup-gcloud#service-account-key-json). This also fixes deprecation warnings on integration test workflows. ``` "service_account_key" has been deprecated. Please switch to using google-github-actions/auth which supports both Workload Identity Federation and Service Account Key JSON authentication. For more details, see https://github.com/google-github-actions/setup-gcloud#authorization ``` --- .github/workflows/integrationTests.yaml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/integrationTests.yaml b/.github/workflows/integrationTests.yaml index c9f313c264..51e5322416 100644 --- a/.github/workflows/integrationTests.yaml +++ b/.github/workflows/integrationTests.yaml @@ -44,12 +44,15 @@ jobs: with: distribution: 'temurin' java-version: 17 + - name: Set Up Authentication + uses: google-github-actions/auth@v1 + with: + credentials_json: ${{ secrets.SPRING_CLOUD_GCP_CI_SA_KEY }} - name: Setup gcloud - uses: google-github-actions/setup-gcloud@v0 + uses: google-github-actions/setup-gcloud@v1 with: version: latest project_id: spring-cloud-gcp-ci - service_account_key: ${{ secrets.SPRING_CLOUD_GCP_CI_SA_KEY }} export_default_credentials: true - name: Install pubsub-emulator if: ${{ matrix.it == 'pubsub-emulator' }} @@ -129,12 +132,15 @@ jobs: with: distribution: 'temurin' java-version: 17 + - name: Set Up Authentication + uses: google-github-actions/auth@v1 + with: + credentials_json: ${{ secrets.SPRING_CLOUD_GCP_CI_SA_KEY }} - name: Setup gcloud - uses: google-github-actions/setup-gcloud@v0 + uses: google-github-actions/setup-gcloud@v1 with: version: latest project_id: spring-cloud-gcp-ci - service_account_key: ${{ secrets.SPRING_CLOUD_GCP_CI_SA_KEY }} export_default_credentials: true - name: Mvn install # Need this when the directory/pom structure changes id: install