Skip to content

Commit d0b85c2

Browse files
committed
ci: add success gate job
1 parent a42dc85 commit d0b85c2

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

.github/workflows/on_push.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,35 @@ jobs:
2929
docs:
3030
name: Docs 📕
3131
uses: ./.github/workflows/run_docs.yml
32+
33+
success:
34+
name: Pipeline Passed ✅
35+
if: ${{ !cancelled() }}
36+
runs-on: ubuntu-latest
37+
needs:
38+
- build
39+
- package
40+
- checks
41+
- tests
42+
- docs
43+
steps:
44+
- shell: pwsh
45+
run: |
46+
$checks = @{
47+
"Checks" = "${{ needs.checks.result }}"
48+
"Build" = "${{ needs.build.result }}"
49+
"Tests" = "${{ needs.tests.result }}"
50+
"Package" = "${{ needs.package.result }}"
51+
"Docs" = "${{ needs.docs.result }}"
52+
}
53+
54+
$exit = 0
55+
$checks.GetEnumerator() | % {
56+
$status = ($_.Value -eq "success") -or ($_.Value -eq "skipped")
57+
Write-Host "[ $($status ? " OK " : "FAIL") ] $($_.Name)"
58+
if (-not $status) {
59+
$exit = 1
60+
}
61+
}
62+
63+
exit $exit

0 commit comments

Comments
 (0)