mirror of
https://code.forgejo.org/actions/checkout.git
synced 2025-04-24 12:25:34 +00:00
Convert fetchJobs to number type
This commit is contained in:
parent
9efed57e86
commit
0b6a67545b
4 changed files with 22 additions and 7 deletions
11
dist/index.js
vendored
11
dist/index.js
vendored
|
@ -1305,7 +1305,7 @@ function getSource(settings) {
|
|||
core.endGroup();
|
||||
// Checkout submodules
|
||||
core.startGroup('Fetching submodules');
|
||||
yield git.config('submodule.fetchJobs', settings.submodulesFetchJobs);
|
||||
yield git.config('submodule.fetchJobs', settings.submodulesFetchJobs.toString());
|
||||
yield git.submoduleSync(settings.nestedSubmodules);
|
||||
yield git.submoduleUpdate(settings.fetchDepth, settings.nestedSubmodules);
|
||||
yield git.submoduleForeach('git config --local gc.auto 0', settings.nestedSubmodules);
|
||||
|
@ -1778,12 +1778,17 @@ function getInputs() {
|
|||
else if (submodulesString == 'TRUE') {
|
||||
result.submodules = true;
|
||||
}
|
||||
result.submodulesFetchJobs = core.getInput('submodulesFetchJobs') || '1';
|
||||
result.submodulesFetchJobs = Math.floor(Number(core.getInput('submodulesFetchJobs') || '1'));
|
||||
if (isNaN(result.submodulesFetchJobs) || result.submodulesFetchJobs < 0) {
|
||||
result.submodulesFetchJobs = 0;
|
||||
}
|
||||
core.debug(`submodules = ${result.submodules}`);
|
||||
core.debug(`recursive submodules = ${result.nestedSubmodules}`);
|
||||
core.debug(`submodules fetchJobs= ${result.submodulesFetchJobs}`);
|
||||
// Auth token
|
||||
result.authToken = core.getInput('token', { required: true });
|
||||
result.authToken = core.getInput('token', {
|
||||
required: true
|
||||
});
|
||||
// SSH
|
||||
result.sshKey = core.getInput('ssh-key');
|
||||
result.sshKnownHosts = core.getInput('ssh-known-hosts');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue