github-script icon indicating copy to clipboard operation
github-script copied to clipboard

Automatically turn on debugging

Open TWiStErRob opened this issue 3 years ago • 0 comments

I'm trying to debug a script: | block, and I have to modify the script with debug: true to be able to do so even though there's UI for it in shape of "[x] Enable debug logging".

Describe the solution you'd like Make the default value of debug param

https://github.com/actions/github-script/blob/7a5c598405937d486b0331594b5da2b14db670da/action.yml#L15-L17

equivalent to default: ${{ secrets.ACTIONS_STEP_DEBUG || false }}. Not sure if this would work verbatum, but what would work best if it tries to read the secret, and if that fails or not set, then falls back to the now-default false. I tried this as a parameter to the action, and it works well.

Describe alternatives you've considered Trying to remember to put debug: ${{ secrets.ACTIONS_STEP_DEBUG || false }} for all of my .yml files.

Additional context See https://github.com/TWiStErRob/github-actions-test/pull/1 for the workaround.

Normal run without debugging: https://github.com/TWiStErRob/github-actions-test/runs/6740560658 Re-ran with Enable debug logging: https://github.com/TWiStErRob/github-actions-test/runs/6740567848

Note: ignore the fact that there's no output, reported that separately https://github.com/actions/github-script/issues/265

TWiStErRob avatar Jun 04 '22 20:06 TWiStErRob