act
act copied to clipboard
Enhancement: support for `RUNNER_DEBUG` environmental variable
Hello, thanks for this fantastic tool!
The way that I understand it, adding a repository secret called ACTIONS_STEP_DEBUG
and setting it to true
should enable step debug logging.
Per https://github.com/actions/runner/pull/253 and these docs, it appears that the RUNNER_DEBUG
environmental variable is set to 1
when step debug logging is enabled, but I'm not seeing that environmental variable when running this command:
act -s ACTIONS_STEP_DEBUG=true
I haven't seen any issues or PRs related to this so I'm not sure if this is supported already. Please let me know if there's any other information I can provide. Thank you again!
This is currently handled by --verbose
flag, do we need to add it as env variable? I don't think it should be added, but we should have better log output parity with GHA runner.
Just to clarify, it's not solely for my own action debugging purposes. I'm adding step debug logging support to an action and I want to test application logic that only runs if step debug logging is enabled.
You can see an example of this in GitHub's docs for @action/core
, which is their package for writing JS-based actions:
if (core.isDebug()) {
// curl -v https://github.com
} else {
// curl https://github.com
}
I know what you are talking about and it doesn't change what I said
Got it! I personally see the value in having that env variable parity, but totally understand if this isn't something you plan on taking on. Appreciate this tool and the work you've put in regardless!
It looks like using --verbose
does not make core.isDebug()
evalute to true
.
Am I missing something? How are we supposed to enable debugging as if ACTIONS_STEP_DEBUG
was true
?
How are we supposed to enable debugging as if
ACTIONS_STEP_DEBUG
wastrue
?
You can't, we are not the same thing as GHA runner, so naturally we don't have same feature set and log output
Does the architecture of act fundamentally prevent this or could I make a PR that implements it?
I doubt it's impossible to implement but it will need to be tested properly.
As a workaround just set the RUNNER_DEBUG
environment variable manually with --env RUNNER_DEBUG=1
.