Skip to content

Commit

Permalink
Retain 'set-output' command when GITHUB_OUTPUT is not set
Browse files Browse the repository at this point in the history
This should maintain compatibility with older GitHub Enterprise versions
  • Loading branch information
bigdaz committed Oct 22, 2022
1 parent 0842a55 commit 3fbe033
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/resources/init-scripts/build-result-capture.init.gradle
Expand Up @@ -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}")
}
}

Expand Down

0 comments on commit 3fbe033

Please sign in to comment.