Skip to content

Commit ad22eba

Browse files
committed
Add summary job for CI
To enable branch protection setting
1 parent f74312a commit ad22eba

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,3 +427,24 @@ jobs:
427427
-H "Content-Type: application/json" \
428428
-H "X-Hub-Signature-256: sha256=$SIGNATURE" \
429429
-d "$PAYLOAD"
430+
431+
# ===========================================
432+
# Summary job for branch protection
433+
# ===========================================
434+
ci-ok:
435+
name: CI OK
436+
runs-on: ubuntu-latest
437+
needs: [desktop-rust, desktop-svelte, desktop-e2e-linux, website, license-server, scripts]
438+
if: always()
439+
steps:
440+
- name: Check all jobs passed
441+
run: |
442+
if [[ "${{ contains(needs.*.result, 'failure') }}" == "true" ]]; then
443+
echo "Some jobs failed"
444+
exit 1
445+
fi
446+
if [[ "${{ contains(needs.*.result, 'cancelled') }}" == "true" ]]; then
447+
echo "Some jobs were cancelled"
448+
exit 1
449+
fi
450+
echo "All jobs passed or were skipped"

0 commit comments

Comments
 (0)