mxschmitt / action-tmate

Debug your GitHub Actions via SSH by using tmate to get access to the runner system itself.
https://mxschmitt.github.io/action-tmate/
MIT License
2.86k stars 285 forks source link

Manually triggered debug documentation not working #154

Closed uvtrip closed 9 months ago

uvtrip commented 1 year ago

in your Manually triggered debug you mention:

if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}

it should be:

if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled == 'true'}} as all boolean inputs are treated as strings not boolean

YuviGold commented 10 months ago

It was actually fixed with https://github.com/mxschmitt/action-tmate/pull/123 and https://github.com/mxschmitt/action-tmate/pull/129

The information in the inputs context and github.event.inputs context is identical except that the inputs context preserves Boolean values as Booleans instead of converting them to strings.

ref https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#providing-inputs

Unfortunately I had the exact same issue and it took me hours to tell the difference. Due to its confusing usage, I'd suggest adding a clarification regarding the correct usage @mxschmitt

KrisThielemans commented 9 months ago

it's unclear to me what the correct syntax is now. None of them seem to work for me (but then again, commenting the if statement didn't work either!)

uvtrip commented 9 months ago

@YuviGold you are right, managed to handle it thx !