mirror of
https://github.com/gradle/wrapper-validation-action.git
synced 2025-04-21 22:59:19 +08:00
Export failed wrapper(s) path to GITHUB_OUTPUT
This commit is contained in:
parent
01ad6d2663
commit
4aa08202ed
@ -16,6 +16,10 @@ inputs:
|
||||
required: false
|
||||
default: ''
|
||||
|
||||
outputs:
|
||||
failed-wrapper:
|
||||
description: The path of the Gradle Wrapper(s) JAR that failed validation.
|
||||
|
||||
runs:
|
||||
using: 'node16'
|
||||
main: 'dist/index.js'
|
||||
|
3
dist/index.js
vendored
3
dist/index.js
vendored
@ -212,6 +212,9 @@ async function run() {
|
||||
}
|
||||
else {
|
||||
core.setFailed(`Gradle Wrapper Validation Failed!\n See https://github.com/gradle/wrapper-validation-action#reporting-failures\n${result.toDisplayString()}`);
|
||||
if (result.invalid.length > 0) {
|
||||
core.setOutput('failed-wrapper', `${result.invalid.map(w => w.path).join('|')}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (error) {
|
||||
|
@ -17,6 +17,12 @@ export async function run(): Promise<void> {
|
||||
core.setFailed(
|
||||
`Gradle Wrapper Validation Failed!\n See https://github.com/gradle/wrapper-validation-action#reporting-failures\n${result.toDisplayString()}`
|
||||
)
|
||||
if (result.invalid.length > 0) {
|
||||
core.setOutput(
|
||||
'failed-wrapper',
|
||||
`${result.invalid.map(w => w.path).join('|')}`
|
||||
)
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
if (error instanceof Error) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user