From c5e7bc70b545461c00a7e17980d939e3dd81cbca Mon Sep 17 00:00:00 2001 From: Bharath KKB Date: Mon, 14 Dec 2020 18:49:58 -0600 Subject: [PATCH] use GKE action for credentials --- ci/google.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ci/google.yml b/ci/google.yml index 3d7f9f5..0a53cfd 100644 --- a/ci/google.yml +++ b/ci/google.yml @@ -8,7 +8,7 @@ # # 3. Change the values for the GKE_ZONE, GKE_CLUSTER, IMAGE, and DEPLOYMENT_NAME environment variables (below). # -# For more support on how to run the workflow, please visit https://github.com/GoogleCloudPlatform/github-actions/tree/master/example-workflows/gke +# For more support on how to run the workflow, please visit https://github.com/google-github-actions/setup-gcloud/tree/master/example-workflows/gke name: Build and Deploy to GKE @@ -44,8 +44,11 @@ jobs: gcloud --quiet auth configure-docker # Get the GKE credentials so we can deploy to the cluster - - run: |- - gcloud container clusters get-credentials "$GKE_CLUSTER" --zone "$GKE_ZONE" + - uses: google-github-actions/get-gke-credentials@v0.2.1 + with: + cluster_name: ${{ secrets.GKE_PROJECT }} + location: ${{ env.GKE_ZONE }} + credentials: ${{ secrets.GKE_SA_KEY }} # Build the Docker image - name: Build