From 2a56a3f798c2df21aafa8d19c9f4e1e5f3c9fa69 Mon Sep 17 00:00:00 2001 From: darxnet Date: Thu, 19 Nov 2026 12:21:34 +0100 Subject: [PATCH] ci: release when "CI passed" succeeds, not the whole CI A failed non-blocking job (test-macos, experimental servers) fails the called CI workflow, so the release job, which needed all of it, was skipped although "CI passed" succeeded (gomysql main, 2026-11-19). CI exposes the result of "CI passed" as the output passed, and the release job runs on it. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/ci.yml | 7 +++++++ .github/workflows/release.yml | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d1fff11..e178840 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,6 +8,9 @@ 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 }} coverage: description: Total statement coverage in percent value: ${{ jobs.coverage.outputs.total }} @@ -159,8 +162,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: | @@ -168,3 +174,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: