ci(patch): make platform selection work like the build pipeline - #373
Merged
Conversation
patch.yml referenced inputs.build_mac in three places but never declared it as a workflow input, so it always evaluated falsy. Declared it, mirroring build.yml's per-platform booleans. Default is false and the macOS patch step stays disabled (#143) — the toggle only drives certificate install today, and its description says so rather than implying macOS gets patched. Also gated the macOS-runner job on the platforms it actually serves. A Windows-only patch previously still spun up a macos-26 runner that checked out the repo, installed Shorebird and Flutter, then ran no patch step at all. The symbol zip/upload steps deliberately keep gating on android || ios only: with the macOS patch step disabled, a macOS-only run produces no symbols/ and `zip -r symbols.zip symbols/` would fail. Noted inline for whoever re-enables #143. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PanTG9kRBi4QTQ2psvpTxP
Contributor
There was a problem hiding this comment.
🟢 Ready to approve
The workflow changes are consistent, syntactically valid, and directly address the undeclared input and unnecessary macOS runner usage without introducing new failure modes.
This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.
Pull request overview
This PR fixes platform-selection behavior in the patch.yml GitHub Actions workflow so dispatch inputs align with the build pipeline and macOS runners are only used when necessary.
Changes:
- Declares the missing
build_macworkflow input (boolean, defaultfalse) with an explicit note that the macOS patch step remains disabled pending #143. - Adds a job-level
if:to prevent the macOS runner job from starting on Windows-only dispatches. - Removes
build_macfrom the symbols zip/upload gating to avoid failures when a macOS-only run produces nosymbols/.
File summaries
| File | Description |
|---|---|
.github/workflows/patch.yml |
Adds the missing build_mac input and gates the macOS-runner job and symbols steps to match intended per-platform behavior. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Low
We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
patch.ymlreferencedinputs.build_macin three places but never declared it as a workflow input, so it always evaluated falsy:Separately, the macOS-runner
buildjob had noif:. Dispatching a Windows-only patch still spun up amacos-26runner that checked out the repo with submodules, installed Shorebird and Flutter, then ran no patch step at all.Changes
build_mac, mirroringbuild.yml's per-platform booleans. Defaultfalse, and since the macOS patch step is still disabled by Patch doesn't work macOS #143 the toggle only drives certificate install today — the description says so rather than implying macOS gets patched.if: inputs.build_mac || inputs.build_android || inputs.build_ios.android || iosonly. With the macOS patch step disabled, a macOS-only run produces nosymbols/andzip -r symbols.zip symbols/would fail — addingbuild_macthere would have introduced a new failure mode. Noted inline for whoever re-enables Patch doesn't work macOS #143.Input parity with
build.ymlis now:build_mac,build_windows,build_android,build_ios(build.ymladditionally hasbuild_github, which has no patch equivalent).Verification
Both workflows parse, and neither has a dangling or unused input any more:
actionlintisn't installed locally, so that check didn't run.Note
Unrelated to this change, but
release_versionis a free-text string interpolated into the Shorebirdargs:strings. It'sworkflow_dispatch-only so it takes repo write access to reach, but it is an injection surface if you ever want to tighten it.🤖 Generated with Claude Code
https://claude.ai/code/session_01PanTG9kRBi4QTQ2psvpTxP