mirror of
https://code.forgejo.org/actions/checkout.git
synced 2024-11-22 12:23:34 +00:00
Only process fetch-jobs argument if submodules are enabled
This commit is contained in:
parent
cd648cffcf
commit
d46e61f9c4
2 changed files with 19 additions and 13 deletions
15
dist/index.js
vendored
15
dist/index.js
vendored
|
@ -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 a new issue