diff --git a/Build/Build.cs b/Build/Build.cs index 320d9ed932..4085abf1a8 100644 --- a/Build/Build.cs +++ b/Build/Build.cs @@ -54,14 +54,16 @@ class Build : NukeBuild public static int Main() => Execute(x => x.SpellCheck, x => x.Push); + GitHubActions GitHubActions => GitHubActions.Instance; + [Parameter("A branch specification such as develop or refs/pull/1775/merge")] - readonly string BranchSpec; + string BranchSpec => GitHubActions?.Ref; [Parameter("An incrementing build number as provided by the build engine")] - readonly string BuildNumber; + string BuildNumber => GitHubActions?.RunNumber.ToString(); [Parameter("The target branch for the pull request")] - readonly string PullRequestBase; + string PullRequestBase => GitHubActions?.BaseRef; [Parameter("The key to push to Nuget")] [Secret] @@ -102,6 +104,9 @@ class Build : NukeBuild .OnlyWhenDynamic(() => RunAllTargets || HasSourceChanges) .Executes(() => { + Information(BranchSpec); + Information(BuildNumber); + Information(PullRequestBase); EnsureCleanDirectory(ArtifactsDirectory); EnsureCleanDirectory(TestResultsDirectory); });