mirror of
https://code.forgejo.org/actions/checkout.git
synced 2024-12-01 00:19:15 +01:00
build
This commit is contained in:
parent
1f57fc5a0b
commit
bfd0d500ee
2 changed files with 19 additions and 1 deletions
|
@ -62,6 +62,10 @@ Refer [here](https://github.com/actions/checkout/blob/v1/README.md) for previous
|
||||||
# Whether to download Git-LFS files
|
# Whether to download Git-LFS files
|
||||||
# Default: false
|
# Default: false
|
||||||
lfs: ''
|
lfs: ''
|
||||||
|
|
||||||
|
# Whether to silent failure
|
||||||
|
# Default: false
|
||||||
|
silentFailure: ''
|
||||||
```
|
```
|
||||||
<!-- end usage -->
|
<!-- end usage -->
|
||||||
|
|
||||||
|
|
14
dist/index.js
vendored
14
dist/index.js
vendored
|
@ -2611,8 +2611,19 @@ function run() {
|
||||||
// Register problem matcher
|
// Register problem matcher
|
||||||
coreCommand.issueCommand('add-matcher', {}, path.join(__dirname, 'problem-matcher.json'));
|
coreCommand.issueCommand('add-matcher', {}, path.join(__dirname, 'problem-matcher.json'));
|
||||||
// Get sources
|
// Get sources
|
||||||
|
try {
|
||||||
yield gitSourceProvider.getSource(sourceSettings);
|
yield gitSourceProvider.getSource(sourceSettings);
|
||||||
}
|
}
|
||||||
|
catch (error) {
|
||||||
|
core.setOutput('failure', 'true');
|
||||||
|
if (sourceSettings.silentFailure) {
|
||||||
|
core.info(`Silent Failure: ${error.message}`);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
finally {
|
finally {
|
||||||
// Unregister problem matcher
|
// Unregister problem matcher
|
||||||
coreCommand.issueCommand('remove-matcher', { owner: 'checkout-git' }, '');
|
coreCommand.issueCommand('remove-matcher', { owner: 'checkout-git' }, '');
|
||||||
|
@ -10405,6 +10416,9 @@ function getInputs() {
|
||||||
core.debug(`lfs = ${result.lfs}`);
|
core.debug(`lfs = ${result.lfs}`);
|
||||||
// Access token
|
// Access token
|
||||||
result.accessToken = core.getInput('token');
|
result.accessToken = core.getInput('token');
|
||||||
|
// Silent Failure
|
||||||
|
result.silentFailure =
|
||||||
|
(core.getInput('silentFailure') || 'false').toUpperCase() === 'TRUE';
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
exports.getInputs = getInputs;
|
exports.getInputs = getInputs;
|
||||||
|
|
Loading…
Reference in a new issue