Skip to content

Commit 11e95c2

Browse files
committed
PEER-242: Add continue on failure for gha deploy
Signed-off-by: SeeuSim <[email protected]>
1 parent b309ab5 commit 11e95c2

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

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

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -192,17 +192,21 @@ jobs:
192192
if: ${{ contains(github.ref, 'main') && github.event.pull_request.title != 'Feedback' }}
193193
with:
194194
credentials_json: '${{ secrets.GKE_CJSON }}'
195+
continue-on-error: true
195196

196197
- name: Detect GKE Cluster
197198
id: gcloud-detect-gke
198199
if: ${{ contains(github.ref, 'main') && github.event.pull_request.title != 'Feedback' }}
199200
run: |-
200-
clusters="$(gcloud container clusters list)"
201-
is_up="$(echo $clusters | grep ${{ secrets.GKE_CLUSTER }})"
202-
if [[ -z "$is_up" ]]; then
201+
prev_step_success="${{ steps.gcloud-auth.outcome }}"
202+
if [[ "$prev_step_success" != "success" ]]; then
203203
echo "is_up=false" >> $GITHUB_OUTPUT
204-
else
205-
echo "is_up=true" >> $GITHUB_OUTPUT
204+
else
205+
if [[ -z "$(gcloud container clusters list | grep ${{ secrets.GKE_CLUSTER }})" ]]; then
206+
echo "is_up=false" >> $GITHUB_OUTPUT
207+
else
208+
echo "is_up=true" >> $GITHUB_OUTPUT
209+
fi
206210
fi
207211
208212
- name: Get GKE creds

0 commit comments

Comments
 (0)