From 38d6f8f1978419ca6e79208a81bf1f7de5bb7f8e Mon Sep 17 00:00:00 2001 From: deal-machine <95deal@gmail.com> Date: Sat, 16 Mar 2024 16:03:43 -0300 Subject: [PATCH] configure gcloud auth --- .github/workflows/apply.yaml | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/.github/workflows/apply.yaml b/.github/workflows/apply.yaml index db442ae..44a9995 100644 --- a/.github/workflows/apply.yaml +++ b/.github/workflows/apply.yaml @@ -18,12 +18,20 @@ jobs: credentials_json: ${{ secrets.GOOGLE_CRED }} export_environment_variables: true create_credentials_file: true - - - name: Setup GCloud - uses: "google-github-actions/setup-gcloud@v1" - - - name: Activate Service Account on Google Cloud - run: gcloud auth activate-service-account --key-file=${{ secrets.GOOGLE_CRED }} + + - id: auth + uses: 'google-github-actions/auth@v2' + with: + credentials_json: '${{ secrets.GOOGLE_CRED }}' + + - name: 'Set up Cloud SDK' + uses: 'google-github-actions/setup-gcloud@v2' + + - name: 'Use gcloud CLI' + run: 'gcloud info' + + # - name: Activate Service Account on Google Cloud + # run: gcloud auth activate-service-account --key-file=${{ secrets.GOOGLE_CRED }} - name: Setup Cluster Kubernetes run: gcloud container clusters get-credentials ${{ vars.CLUSTER }} --region ${{ vars.REGION }} --project ${{ vars.PROJECT }}