Retain 'set-output' command when GITHUB_OUTPUT is not set

This should maintain compatibility with older GitHub Enterprise versions
This commit is contained in:
Daz DeBoer 2022-10-22 08:20:16 -06:00
parent 0842a550d1
commit 3fbe033aaa
No known key found for this signature in database
GPG Key ID: DD6B9F0B06683D5D

View File

@ -54,6 +54,9 @@ def captureUsingBuildScanPublished(buildScanExtension, rootProject, invocationId
def githubOutput = System.getenv("GITHUB_OUTPUT") def githubOutput = System.getenv("GITHUB_OUTPUT")
if (githubOutput) { if (githubOutput) {
new File(githubOutput) << "build-scan-url=${buildScan.buildScanUri}\n" 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}")
} }
} }