mirror of http://gitea.com/actions/checkout
Only process fetch-jobs argument if submodules are enabled
This commit is contained in:
parent
cd648cffcf
commit
d46e61f9c4
|
@ -17219,12 +17219,6 @@ function getInputs() {
|
|||
result.fetchDepth = 0;
|
||||
}
|
||||
core.debug(`fetch depth = ${result.fetchDepth}`);
|
||||
// Fetch jobs
|
||||
result.fetchJobs = Math.floor(Number(core.getInput('fetch-jobs') || '-1'));
|
||||
if (isNaN(result.fetchJobs) || result.fetchJobs < -1) {
|
||||
result.fetchJobs = -1;
|
||||
}
|
||||
core.debug(`fetch jobs = ${result.fetchJobs}`);
|
||||
// LFS
|
||||
result.lfs = (core.getInput('lfs') || 'false').toUpperCase() === 'TRUE';
|
||||
core.debug(`lfs = ${result.lfs}`);
|
||||
|
@ -17241,6 +17235,15 @@ function getInputs() {
|
|||
}
|
||||
core.debug(`submodules = ${result.submodules}`);
|
||||
core.debug(`recursive submodules = ${result.nestedSubmodules}`);
|
||||
// Fetch jobs during submodule update
|
||||
result.fetchJobs = -1;
|
||||
if (result.submodules) {
|
||||
result.fetchJobs = Math.floor(Number(core.getInput('fetch-jobs') || '-1'));
|
||||
if (isNaN(result.fetchJobs) || result.fetchJobs < -1) {
|
||||
result.fetchJobs = -1;
|
||||
}
|
||||
core.debug(`fetch jobs = ${result.fetchJobs}`);
|
||||
}
|
||||
// Auth token
|
||||
result.authToken = core.getInput('token', { required: true });
|
||||
// SSH
|
||||
|
|
|
@ -89,13 +89,6 @@ export async function getInputs(): Promise<IGitSourceSettings> {
|
|||
}
|
||||
core.debug(`fetch depth = ${result.fetchDepth}`)
|
||||
|
||||
// Fetch jobs
|
||||
result.fetchJobs = Math.floor(Number(core.getInput('fetch-jobs') || '-1'))
|
||||
if (isNaN(result.fetchJobs) || result.fetchJobs < -1) {
|
||||
result.fetchJobs = -1
|
||||
}
|
||||
core.debug(`fetch jobs = ${result.fetchJobs}`)
|
||||
|
||||
// LFS
|
||||
result.lfs = (core.getInput('lfs') || 'false').toUpperCase() === 'TRUE'
|
||||
core.debug(`lfs = ${result.lfs}`)
|
||||
|
@ -113,6 +106,16 @@ export async function getInputs(): Promise<IGitSourceSettings> {
|
|||
core.debug(`submodules = ${result.submodules}`)
|
||||
core.debug(`recursive submodules = ${result.nestedSubmodules}`)
|
||||
|
||||
// Fetch jobs during submodule update
|
||||
result.fetchJobs = -1
|
||||
if (result.submodules) {
|
||||
result.fetchJobs = Math.floor(Number(core.getInput('fetch-jobs') || '-1'))
|
||||
if (isNaN(result.fetchJobs) || result.fetchJobs < -1) {
|
||||
result.fetchJobs = -1
|
||||
}
|
||||
core.debug(`fetch jobs = ${result.fetchJobs}`)
|
||||
}
|
||||
|
||||
// Auth token
|
||||
result.authToken = core.getInput('token', {required: true})
|
||||
|
||||
|
|
Loading…
Reference in New Issue