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 6, 2024
1 parent dd20ebd commit 38bcc05
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/on_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,36 @@ 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: |
$status = @(
$("Checks" , "${{ needs.checks.result }}"),
$("Build" , "${{ needs.build.result }}"),
$("Tests" , "${{ needs.tests.result }}"),
$("Package" , "${{ needs.package.result }}"),
$("Docs" , "${{ needs.docs.result }}")
) | % ${
@($_[0], (($_[1] -eq 'success') -or ($_[1] -eq 'skipped'))
}
$exit = 0
$status | % {
Write-Host "[ $($_[1] ? " OK " " "FAIL") ] $_[0]"
if (-not $_[1]) {
$exit = 1
}
}
exit $exit

0 comments on commit 38bcc05

Please sign in to comment.