A ternary `${{ inputs.replicas && inputs.replicas || 2 }}` returns 2 when replicas is 0.
IntermediateTroubleshootingExpressions, Outputs, Matrix & Conditions
Answer
Likely causes → 0 is falsy, so cond && a || b falls through to b.
Diagnose → Evaluate with sample values.
Fix → Use a default on the input itself (default: 2) and read inputs.replicas directly, or compute in a shell step.
Prevent → Keep the ternary idiom for string values that are never empty.
More on Expressions, Outputs, Matrix & Conditions
A downstream job reads `needs.build.outputs.digest` and gets an empty string.Intermediate`Warning: Skip output 'image' since it may contain secret.`Advanced`Error: Unable to process file command 'output' successfully. Error: Invalid format ' "items": ['`Intermediate`Error when evaluating 'strategy' for job 'build'. .github/workflows/ci.yml (Line: 30, Col: 15): Matrix vector 'service' does not contain any values`Intermediate`Error reading JToken from JsonReader. Path '', line 0, position 0.`Advanced`if: github.event.inputs.deploy == true` never runs the step, even when the box is ticked.Beginner