From 3fbe033aaae657f011f88f29be9e65ed26bd29ef Mon Sep 17 00:00:00 2001 From: Daz DeBoer Date: Sat, 22 Oct 2022 08:20:16 -0600 Subject: [PATCH] Retain 'set-output' command when GITHUB_OUTPUT is not set This should maintain compatibility with older GitHub Enterprise versions --- src/resources/init-scripts/build-result-capture.init.gradle | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/resources/init-scripts/build-result-capture.init.gradle b/src/resources/init-scripts/build-result-capture.init.gradle index 5f3d1fd..c8eb8db 100644 --- a/src/resources/init-scripts/build-result-capture.init.gradle +++ b/src/resources/init-scripts/build-result-capture.init.gradle @@ -54,6 +54,9 @@ def captureUsingBuildScanPublished(buildScanExtension, rootProject, invocationId def githubOutput = System.getenv("GITHUB_OUTPUT") if (githubOutput) { new File(githubOutput) << "build-scan-url=${buildScan.buildScanUri}\n" + } else { + // Retained for compatibility with older GitHub Enterprise versions + println("::set-output name=build-scan-url::${buildScan.buildScanUri}") } }