diff --git a/dist/index.js b/dist/index.js index cbb39f9..ac06948 100644 --- a/dist/index.js +++ b/dist/index.js @@ -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 diff --git a/src/input-helper.ts b/src/input-helper.ts index ad26b7a..a06afe0 100644 --- a/src/input-helper.ts +++ b/src/input-helper.ts @@ -89,13 +89,6 @@ export async function getInputs(): Promise { } 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 { 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})