diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3817dcd..7cb2335 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,6 +5,10 @@ name: CI on: pull_request: workflow_call: + outputs: + passed: + description: '"true" when "CI passed" succeeded; non-blocking jobs may still have failed' + value: ${{ jobs.ok.outputs.passed }} permissions: contents: read @@ -162,8 +166,11 @@ jobs: if: always() needs: [test, lint, vulncheck, coverage] runs-on: ubuntu-latest + outputs: + passed: ${{ steps.check.outputs.passed }} steps: - name: Check results + id: check env: RESULTS: ${{ join(needs.*.result, ' ') }} run: | @@ -171,3 +178,4 @@ jobs: for r in $RESULTS; do [ "$r" = "success" ] || exit 1 done + echo "passed=true" >> "$GITHUB_OUTPUT" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4862448..bdbf345 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,6 +23,10 @@ jobs: release: name: Release needs: ci + # "CI passed", not the whole CI: a failed non-blocking job (macOS, + # experimental servers) makes the called workflow fail and would skip + # the release. + if: ${{ !cancelled() && needs.ci.outputs.passed == 'true' }} runs-on: ubuntu-latest timeout-minutes: 10 steps: