File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -138,6 +138,8 @@ jobs:
138
138
if : |
139
139
(needs.configuration.outputs.pr_no_diff_skip != 'true')
140
140
runs-on : [ self-hosted ]
141
+ outputs :
142
+ success : ${{ job.status }}
141
143
concurrency :
142
144
group : ${{ github.head_ref || github.ref_name }}-build-gitpod
143
145
# For the main branch we always want the build job to run to completion
@@ -281,6 +283,25 @@ jobs:
281
283
path : |
282
284
test-coverage-report
283
285
286
+ # A skipped check counts as passed in gh actions - so there can be a case where
287
+ # build-gitpod never ran, and a PR got merged regardless
288
+ # this should provide a workaround to that and provide a check we can always use as a required
289
+ ci-check :
290
+ runs-on : [ self-hosted ]
291
+ if : always() # always run, so we never skip the check
292
+ needs : [ build-gitpod ]
293
+ steps :
294
+ # pass step only when the output of build-gitpod job is set
295
+ - run : |
296
+ passed="${{ needs.build-gitpod.outputs.success }}"
297
+ if [[ $passed == "true" ]]; then
298
+ echo "build-gitpod passed"
299
+ exit 0
300
+ else
301
+ echo "build-gitpod failed"
302
+ exit 1
303
+ fi
304
+
284
305
install :
285
306
name : " Install Gitpod"
286
307
needs : [ configuration, build-previewctl, build-gitpod, infrastructure ]
You can’t perform that action at this time.
0 commit comments