From bcd9918e7941ee76fc87e085081fa395824ce56f 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 | 8 ++++++++ .github/workflows/release.yml | 4 ++++ 2 files changed, 12 insertions(+) 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: