workflows: add debug input for sync templates act #7057
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Introduce a workflow
debug
input formisc-sync-templates.yml
and use it instead of therunner.debug
context variable, which is set to '1' whenACTIONS_RUNNER_DEBUG
env/secret is set (https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/troubleshooting-workflows/enabling-debug-logging#enabling-runner-diagnostic-logging). This is useful for controlling when to show debug prints.Integration
N/A
Review Notes
Using
runner.debug
requires setting theACTIONS_RUNNER_DEBUG
env variable, but setting it to false/true is doable through an input, or by importing a variable from the github env file (which requires a code change). This input alone can replace the entirerunner.debug
+ACTIONS_RUNNER_DEBUG
setup, which simplifies debug printing, but it doesn't look as standard asrunner.debug
. I don't think it is a big deal overall, for this action alone, but happy to account for other opinions.Note: setting the
ACTIONS_RUNNER_DEBUG
whenever we want in a separate branch wouldn't be useful because we can not run themisc-sync-templates.yml
action from other branch thanmaster
(due to branch protection rules), so we need to expose this input to be controllable frommaster
.