mirror of
https://code.forgejo.org/actions/checkout.git
synced 2025-04-21 17:12:03 +03:00
feat: silentFailure and outputs.failure
This commit is contained in:
parent
cab31617d8
commit
1f57fc5a0b
4 changed files with 22 additions and 2 deletions
11
src/main.ts
11
src/main.ts
|
@ -19,7 +19,16 @@ async function run(): Promise<void> {
|
|||
)
|
||||
|
||||
// Get sources
|
||||
await gitSourceProvider.getSource(sourceSettings)
|
||||
try {
|
||||
await gitSourceProvider.getSource(sourceSettings)
|
||||
} catch (error) {
|
||||
core.setOutput('failure', 'true')
|
||||
if (sourceSettings.silentFailure) {
|
||||
core.info(`Silent Failure: ${error.message}`)
|
||||
} else {
|
||||
throw error
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
// Unregister problem matcher
|
||||
coreCommand.issueCommand('remove-matcher', {owner: 'checkout-git'}, '')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue