Skip to content

Commit 11b5db6

Browse files
committed
PEER-242: Update actions script
Signed-off-by: SeeuSim <[email protected]>
1 parent 1c68d05 commit 11b5db6

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

.github/workflows/build-deploy-docker.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ on:
1111
- main
1212

1313
env:
14+
IS_GKE_CLUSTER_UP: true
1415
DOCKER_REGISTRY_USN: ay2425s1cs3219g16
1516
USER_EXPRESS_PORT: 9001
1617
QUESTION_EXPRESS_PORT: 9002
@@ -188,21 +189,21 @@ jobs:
188189

189190
- name: Setup GCloud
190191
uses: google-github-actions/setup-gcloud@v2
191-
if: ${{ contains(github.ref, 'main') && github.event.pull_request.title != 'Feedback' && secrets.GKE_CLUSTER }}
192+
if: ${{ contains(github.ref, 'main') && github.event.pull_request.title != 'Feedback' && env.IS_GKE_CLUSTER_UP }}
192193
with:
193194
service_account_key: ${{ secrets.GKE_SA_KEY }}
194195
project_id: ${{ secrets.GKE_PROJECT }}
195196

196197
- name: Get GKE creds
197198
uses: google-github-actions/get-gke-credentials@v2
198-
if: ${{ contains(github.ref, 'main') && github.event.pull_request.title != 'Feedback' && secrets.GKE_CLUSTER }}
199+
if: ${{ contains(github.ref, 'main') && github.event.pull_request.title != 'Feedback' && env.IS_GKE_CLUSTER_UP }}
199200
with:
200201
cluster_name: ${{ secrets.GKE_CLUSTER }}
201202
location: ${{ secrets.GKE_ZONE }}
202203
credentials: ${{ secrets.GKE_SA_KEY }}
203204

204205
- name: Deploy to GKE
205-
if: ${{ contains(github.ref, 'main') && github.event.pull_request.title != 'Feedback' && secrets.GKE_CLUSTER }}
206+
if: ${{ contains(github.ref, 'main') && github.event.pull_request.title != 'Feedback' && env.IS_GKE_CLUSTER_UP }}
206207
run: |-
207208
deployments=("collab-service" "matching-service" "question-service" "user-service" "frontend")
208209
for dplymnt in "${deployments[@]}"; do

0 commit comments

Comments
 (0)