use GKE action for credentials

This commit is contained in:
Bharath KKB
2020-12-14 18:49:58 -06:00
committed by GitHub
parent 14acff1f1e
commit c5e7bc70b5
+6 -3
View File
@@ -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