Skip to content

Commit 51e5756

Browse files
authored
updated workflow
1 parent 8c67dd4 commit 51e5756

File tree

1 file changed

+16
-10
lines changed

1 file changed

+16
-10
lines changed

.github/workflows/deployment.yml

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -50,23 +50,32 @@ jobs:
5050
runs-on: ubuntu-20.04
5151
steps:
5252
- name: Checkout
53-
uses: actions/checkout@v2
53+
uses: actions/checkout@v3
5454
with:
5555
repository: ${{ inputs.repository }}
5656
ref: ${{ inputs.ref }}
5757

58-
- name: 'Cloud Auth'
59-
uses: 'google-github-actions/auth@v0'
58+
- name: Google Authentication
59+
uses: google-github-actions/auth@v1.0.0
6060
with:
61-
credentials_json: '${{ secrets.SERVICE_ACCOUNT_KEY }}'
61+
credentials_json: ${{ secrets.SERVICE_ACCOUNT_KEY }}
6262

63-
- name: Setup Cloud SDK
64-
uses: google-github-actions/[email protected]
63+
- name: Get GKE credentials
64+
uses: google-github-actions/[email protected]
65+
with:
66+
project_id: {{ env.PROJECT_ID }}
67+
cluster_name: {{ env.CLUSTER_NAME }}
68+
location: {{ env.REGION }}
69+
70+
- name: Setup gcloud cli
71+
uses: google-github-actions/[email protected]
72+
with:
73+
version: '412.0.0'
6574

6675
- name: Authorize Docker push
6776
run: |
6877
gcloud auth list
69-
gcloud auth configure-docker
78+
gcloud --quiet auth configure-docker
7079
7180
- name: Build and Push image
7281
run: |
@@ -85,7 +94,6 @@ jobs:
8594
--namespace ${NAMESPACE} \
8695
--port 52773 \
8796
--min-instances 1 \
88-
--memory 512Mi \
8997
--timeout 300 \
9098
--verbosity debug \
9199
--image ${GCR_LOCATION}/${PROJECT_ID}/${IMAGE_NAME}:${GITHUB_SHA}
@@ -104,7 +112,6 @@ jobs:
104112
105113
- name: Create domain name
106114
run: |
107-
gcloud container clusters get-credentials ${CLUSTER_NAME} --region ${REGION} --project ${PROJECT_ID}
108115
kubectl version
109116
echo "[INFO] Checking if [${DOMAIN_NAME}] is in the existing Ingress annotation..."
110117
CURRENT_DOMAINS_LIST=$(kubectl -n gke-system get svc istio-ingress -o jsonpath="{.metadata.annotations['external-dns\.alpha\.kubernetes\.io/hostname']}")
@@ -119,6 +126,5 @@ jobs:
119126
120127
- name: Enable TLS-access
121128
run: |
122-
gcloud container clusters get-credentials ${CLUSTER_NAME} --region ${REGION} --project ${PROJECT_ID}
123129
kubectl version
124130
kubectl patch configmap config-domainmapping -n knative-serving -p '{"data":{"autoTLS":"Enabled"}}'

0 commit comments

Comments
 (0)