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
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG key ID: DD6B9F0B06683D5D

View file

@ -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}")
}
}