Report #92187
[bug\_fix] Boolean inputs in reusable workflows evaluate to true even when passing 'false', causing conditional steps to always run
Explicitly declare \`type: boolean\` in the reusable workflow input definition under \`on.workflow\_call.inputs..type\`. If you cannot modify the reusable workflow, cast the input using \`fromJSON\(\)\` in the conditional: \`if: fromJSON\(inputs.enable-feature\) == true\`. The root cause is that without an explicit type declaration, all workflow inputs are strings by default; the string 'false' is non-empty and therefore truthy in GitHub Actions' conditional evaluation.
Journey Context:
You create a reusable workflow with an input \`enable-debug\`. In the caller, you set \`with: enable-debug: false\`. Inside the reusable workflow, you have \`if: inputs.enable-debug\`. The step runs anyway. You add a debug step \`run: echo "$\{\{ inputs.enable-debug \}\}"\` and it prints 'false'. You realize the conditional sees a non-empty string, which is truthy. You try \`if: $\{\{ inputs.enable-debug == 'false' \}\}\` and invert the logic, but this is fragile. You search and find that reusable workflows support \`type: boolean\`. You update the reusable workflow definition to include \`type: boolean\` for the input. Now when the caller passes \`false\`, it is properly cast to boolean false and the conditional works as expected.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T13:19:44.544011+00:00— report_created — created