fix(ci): gate the binary and formula jobs on the resolved tag
Neither `inputs.tag` nor `github.event.inputs.tag` evaluates in a job-level `if` on workflow_dispatch, so both spellings left the binaries and homebrew jobs skipped on every manual recovery run, while the step-level condition on the same input fired correctly and resolved the tag. The run log settles it: INPUT_TAG reached the step as v7.0.0 and the jobs still skipped. `Resolve tag` already runs exactly when there is something to build, so its output is the honest signal, and a `needs` output does evaluate here.
This commit is contained in:
@@ -138,7 +138,13 @@ jobs:
|
|||||||
# `github.event.inputs`, not `inputs`: the latter is empty in a job-level
|
# `github.event.inputs`, not `inputs`: the latter is empty in a job-level
|
||||||
# condition on workflow_dispatch, and `null != ''` coerces to false, which
|
# condition on workflow_dispatch, and `null != ''` coerces to false, which
|
||||||
# silently skipped this job on every manual recovery run.
|
# silently skipped this job on every manual recovery run.
|
||||||
if: needs.release.outputs.created == 'true' || github.event.inputs.tag != ''
|
# Gate on the resolved tag, not on the dispatch input: neither `inputs.tag`
|
||||||
|
# nor `github.event.inputs.tag` evaluates in a job-level `if`, so both
|
||||||
|
# spellings skipped this job on every manual recovery run. `Resolve tag`
|
||||||
|
# already runs exactly when there is something to build (a fresh release or
|
||||||
|
# a hand-typed tag), and its output is a plain `needs` value that does work
|
||||||
|
# here.
|
||||||
|
if: needs.release.outputs.tag != ''
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
# One flaky cross-linker must not hold back the five targets that built.
|
# One flaky cross-linker must not hold back the five targets that built.
|
||||||
@@ -195,7 +201,13 @@ jobs:
|
|||||||
homebrew:
|
homebrew:
|
||||||
name: Homebrew tap
|
name: Homebrew tap
|
||||||
needs: [release, binaries]
|
needs: [release, binaries]
|
||||||
if: needs.release.outputs.created == 'true' || github.event.inputs.tag != ''
|
# Gate on the resolved tag, not on the dispatch input: neither `inputs.tag`
|
||||||
|
# nor `github.event.inputs.tag` evaluates in a job-level `if`, so both
|
||||||
|
# spellings skipped this job on every manual recovery run. `Resolve tag`
|
||||||
|
# already runs exactly when there is something to build (a fresh release or
|
||||||
|
# a hand-typed tag), and its output is a plain `needs` value that does work
|
||||||
|
# here.
|
||||||
|
if: needs.release.outputs.tag != ''
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|||||||
Reference in New Issue
Block a user