Improve title on build scan notice

This commit is contained in:
Daz DeBoer 2021-11-28 08:03:42 -07:00
parent 76f85a724c
commit a25c0ce6cb
No known key found for this signature in database
GPG Key ID: DD6B9F0B06683D5D

View File

@ -296,12 +296,19 @@ if (isTopLevelBuild) {
def registerCallbacks(buildScanExtension, rootProjectName) {
buildScanExtension.with {
def buildOutcome = ""
def scanFile = new File("gradle-build-scan.txt")
buildFinished { result ->
buildOutcome = result.failure == null ? " succeeded" : " failed"
}
buildScanPublished { buildScan ->
scanFile.text = buildScan.buildScanUri
println('::notice title=build-scan-url::' + buildScan.buildScanUri)
println('::set-output name=build-scan-url::' + buildScan.buildScanUri)
// Send commands directly to GitHub Actions via STDOUT.
println("::notice title=Build '\${rootProjectName}'\${buildOutcome}::\${buildScan.buildScanUri}")
println("::set-output name=build-scan-url::\${buildScan.buildScanUri}")
}
}
}