Enabling debug logging
In the previous recipe, we saw that you can rerun failed jobs or all jobs with debug logging enabled. However, you can also enable or disable debug logging on a repository base.
How to do it…
We can enable or disable debug logging by adding a variable called ACTIONS_STEP_DEBUG
to our repository and setting the value to true
or false
. This will add a very verbose output to our workflow logs and all debug messages, and this will be displayed from all actions.
You can configure the variable using the web, the GitHub CLI, or VS Code. To set the variable using the web, in the repository, navigate to Settings | Secrets and variables | Actions and pick the Variables tab (/settings/variables/actions
). Click New repository variable (which will redirect you to /settings/variables/actions/new
), enter ACTIONS_STEP_DEBUG
as the name, true
as the value, and click Add variable.
To set it using the CLI, just execute the following line:
$ gh variable set...