Skip to content

Commit

Permalink
ci: add success gate job
Browse files Browse the repository at this point in the history
  • Loading branch information
nzbr committed Dec 9, 2024
1 parent a42dc85 commit d0b85c2
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/on_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,35 @@ jobs:
docs:
name: Docs 📕
uses: ./.github/workflows/run_docs.yml

success:
name: Pipeline Passed ✅
if: ${{ !cancelled() }}
runs-on: ubuntu-latest
needs:
- build
- package
- checks
- tests
- docs
steps:
- shell: pwsh
run: |
$checks = @{
"Checks" = "${{ needs.checks.result }}"
"Build" = "${{ needs.build.result }}"
"Tests" = "${{ needs.tests.result }}"
"Package" = "${{ needs.package.result }}"
"Docs" = "${{ needs.docs.result }}"
}
$exit = 0
$checks.GetEnumerator() | % {
$status = ($_.Value -eq "success") -or ($_.Value -eq "skipped")
Write-Host "[ $($status ? " OK " : "FAIL") ] $($_.Name)"
if (-not $status) {
$exit = 1
}
}
exit $exit

0 comments on commit d0b85c2

Please sign in to comment.