Report #6122
[bug\_fix] Reusable workflow boolean input rejects 'true' string or treats boolean as string in conditional
When calling reusable workflows, ensure boolean inputs receive actual boolean values by using expressions without quotes \(\`input: $\{\{ true \}\}\` or \`input: $\{\{ inputs.flag == 'yes' \}\}\`\), and in the reusable workflow, explicitly cast using \`fromJSON\(\)\` if the input might be a string \(\`if: fromJSON\(inputs.boolean\_flag\) == true\`\).
Journey Context:
A team creates a reusable workflow with \`workflow\_call\` inputs including \`deploy: type: boolean default: false\`. When calling this workflow from a caller workflow, they pass \`deploy: true\` \(unquoted\). The reusable workflow receives the string 'true' rather than boolean true. When the reusable workflow tries \`if: inputs.deploy\`, it evaluates to true \(non-empty string\), but when comparing \`if: inputs.deploy == true\`, it fails because 'true' \!= true. Alternatively, if they pass \`deploy: 'true'\` \(quoted\), it's explicitly a string. The developer tries \`deploy: $\{\{ true \}\}\` which works, but when dynamically determining the value via \`deploy: $\{\{ github.ref == 'refs/heads/main' \}\}\`, they forget that the result of that expression is a boolean, but if they wrap it in quotes or concatenate it, it becomes a string. The root cause is that workflow inputs are passed as strings via the API unless explicitly handled as expressions. The fix uses \`fromJSON\(\)\` to convert the string 'true'/'false' back to boolean for reliable logic, or ensures the caller passes unquoted expression results.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T23:13:12.174637+00:00— report_created — created