mirror of
https://github.com/gradle/gradle-build-action.git
synced 2024-11-26 11:02:10 +00:00
Improve title on build scan notice
This commit is contained in:
parent
76f85a724c
commit
a25c0ce6cb
1 changed files with 9 additions and 2 deletions
|
@ -296,12 +296,19 @@ if (isTopLevelBuild) {
|
||||||
|
|
||||||
def registerCallbacks(buildScanExtension, rootProjectName) {
|
def registerCallbacks(buildScanExtension, rootProjectName) {
|
||||||
buildScanExtension.with {
|
buildScanExtension.with {
|
||||||
|
def buildOutcome = ""
|
||||||
def scanFile = new File("gradle-build-scan.txt")
|
def scanFile = new File("gradle-build-scan.txt")
|
||||||
|
|
||||||
|
buildFinished { result ->
|
||||||
|
buildOutcome = result.failure == null ? " succeeded" : " failed"
|
||||||
|
}
|
||||||
|
|
||||||
buildScanPublished { buildScan ->
|
buildScanPublished { buildScan ->
|
||||||
scanFile.text = buildScan.buildScanUri
|
scanFile.text = buildScan.buildScanUri
|
||||||
|
|
||||||
println('::notice title=build-scan-url::' + buildScan.buildScanUri)
|
// Send commands directly to GitHub Actions via STDOUT.
|
||||||
println('::set-output name=build-scan-url::' + buildScan.buildScanUri)
|
println("::notice title=Build '\${rootProjectName}'\${buildOutcome}::\${buildScan.buildScanUri}")
|
||||||
|
println("::set-output name=build-scan-url::\${buildScan.buildScanUri}")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue