|
|
|
@ -7670,7 +7670,7 @@ class GitCommandManager {
|
|
|
|
|
yield this.execGit(args);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
submoduleUpdate(fetchDepth, recursive) {
|
|
|
|
|
submoduleUpdate(fetchDepth, recursive, fetchJobs) {
|
|
|
|
|
return __awaiter(this, void 0, void 0, function* () {
|
|
|
|
|
const args = ['-c', 'protocol.version=2'];
|
|
|
|
|
args.push('submodule', 'update', '--init', '--force');
|
|
|
|
@ -7680,6 +7680,9 @@ class GitCommandManager {
|
|
|
|
|
if (recursive) {
|
|
|
|
|
args.push('--recursive');
|
|
|
|
|
}
|
|
|
|
|
if (fetchJobs > -1) {
|
|
|
|
|
args.push(`--jobs=${fetchJobs}`);
|
|
|
|
|
}
|
|
|
|
|
yield this.execGit(args);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
@ -18537,6 +18540,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
|
|
|
|
@ -32009,7 +32021,7 @@ function getSource(settings) {
|
|
|
|
|
// Checkout submodules
|
|
|
|
|
core.startGroup('Fetching submodules');
|
|
|
|
|
yield git.submoduleSync(settings.nestedSubmodules);
|
|
|
|
|
yield git.submoduleUpdate(settings.fetchDepth, settings.nestedSubmodules);
|
|
|
|
|
yield git.submoduleUpdate(settings.fetchDepth, settings.nestedSubmodules, settings.fetchJobs);
|
|
|
|
|
yield git.submoduleForeach('git config --local gc.auto 0', settings.nestedSubmodules);
|
|
|
|
|
core.endGroup();
|
|
|
|
|
// Persist credentials
|
|
|
|
|