Skip to content

ci: add success gate job #646

ci: add success gate job

ci: add success gate job #646

Workflow file for this run

name: "Push"
on:
push:
branches: [main]
pull_request: {}
jobs:
build:
name: Build πŸ› οΈ
uses: ./.github/workflows/run_build.yml
package:
name: Package πŸ“¦
uses: ./.github/workflows/run_package.yml
needs:
- build
checks:
name: Checks πŸ“‹
uses: ./.github/workflows/run_checks.yml
tests:
name: Tests πŸ§ͺ
uses: ./.github/workflows/run_tests.yml
needs:
- build
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