From 698d0e2b62829e429172c652c5dedff913220ef5 Mon Sep 17 00:00:00 2001 From: Sam Date: Thu, 28 Mar 2024 15:54:38 +0100 Subject: [PATCH] Add support to detect GitHub actions debug logging https://docs.github.com/en/actions/learn-github-actions/variables#default-environment-variables --- source/Nuke.Common/CI/GitHubActions/GitHubActions.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/Nuke.Common/CI/GitHubActions/GitHubActions.cs b/source/Nuke.Common/CI/GitHubActions/GitHubActions.cs index 1fdf51c5d..e3bbe6757 100644 --- a/source/Nuke.Common/CI/GitHubActions/GitHubActions.cs +++ b/source/Nuke.Common/CI/GitHubActions/GitHubActions.cs @@ -121,6 +121,9 @@ internal GitHubActions() public AbsolutePath StepSummaryFile => EnvironmentInfo.GetVariable("GITHUB_STEP_SUMMARY"); + /// This is set only if debug logging is enabled, and always has the value of 1. It can be useful as an indicator to enable additional debugging or verbose logging in your own job steps. + public bool IsDebugLoggingEnabled => EnvironmentInfo.HasVariable("RUNNER_DEBUG"); + public void Group(string group) { WriteCommand("group", group);