Boolean Type Shenanigans: How a Type Mismatch Broke Our Release Pipeline

I spent a frustrating afternoon debugging why our AI Agents Genkit release workflow kept stubbornly ignoring the dry_run checkbox. Every time someone unchecked it to push a real release, the pipeline would still run in dry-run mode—creating git tags that never got pushed and never triggering the actual GitHub Release. Classic case of “it works on my machine” (or rather, “it doesn’t work anywhere”).
The culprit? A type mismatch hiding in plain sight within our releasekit-uv.yml GitHub Actions workflow.
The Type Trap
Here’s what happened: we declared inputs.dry_run as a proper boolean type (line 209), but then immediately betrayed that declaration in the environment variable expression:
DRY_RUN: ${{ ... || (inputs.dry_run == 'false' && 'false' || 'true') }}
Looks reasonable, right? Wrong. GitHub Actions expressions are weakly typed, and when you compare a boolean false against the string 'false', they don’t match. A boolean false is never equal to a string 'false'. So the comparison fails, the short-circuit logic trips, and boom—everything defaults to 'true'.
The Fix (and the Lesson)
The solution was deceptively simple: treat the boolean like… a boolean:
DRY_RUN: ${{ ... || (inputs.dry_run && 'true' || 'false') }}
Now the expression respects the actual type. When someone unchecks the box, inputs.dry_run is genuinely false, the condition fails, and we get 'false'—triggering a real release.
Why This Matters
This wasn’t just a cosmetic bug. It meant our v0.6.0 release dispatch actually created git tags locally but never pushed them to the remote repository, and the GitHub Release page stayed empty. Users waiting for the official release were stuck. The fix ensures that our multi-platform CI/CD pipeline in GitHub Actions respects user intent—when you uncheck “dry run,” you get a real release, not a phantom one.
The glass-is-twice-as-big lesson here? Always match your types, even in loosely-typed expression languages. A boolean should stay a boolean. 😄
Metadata
- Branch:
- main
- Dev Joke
- Arch — единственная технология, где «это работает» считается документацией.