mirror of
https://code.forgejo.org/actions/checkout.git
synced 2025-04-24 20:35:33 +00:00
Merge 4475b1ceed
into cd7d8d697e
This commit is contained in:
commit
ff5874f76b
9 changed files with 219 additions and 103 deletions
17
dist/index.js
vendored
17
dist/index.js
vendored
|
@ -1255,6 +1255,7 @@ function getSource(settings) {
|
|||
}
|
||||
// Fetch
|
||||
core.startGroup('Fetching the repository');
|
||||
yield git.config('fetch.parallel', settings.fetchParallel.toString(), true);
|
||||
const fetchOptions = {};
|
||||
if (settings.filter) {
|
||||
fetchOptions.filter = settings.filter;
|
||||
|
@ -1323,6 +1324,7 @@ function getSource(settings) {
|
|||
core.endGroup();
|
||||
// Checkout submodules
|
||||
core.startGroup('Fetching submodules');
|
||||
yield git.config('submodule.fetchJobs', settings.submodulesFetchJobs.toString(), true);
|
||||
yield git.submoduleSync(settings.nestedSubmodules);
|
||||
yield git.submoduleUpdate(settings.fetchDepth, settings.nestedSubmodules);
|
||||
yield git.submoduleForeach('git config --local gc.auto 0', settings.nestedSubmodules);
|
||||
|
@ -1771,6 +1773,12 @@ function getInputs() {
|
|||
result.fetchTags =
|
||||
(core.getInput('fetch-tags') || 'false').toUpperCase() === 'TRUE';
|
||||
core.debug(`fetch tags = ${result.fetchTags}`);
|
||||
// Fetch tags
|
||||
result.fetchParallel = Math.floor(Number(core.getInput('fetch-parallel') || '1'));
|
||||
if (isNaN(result.fetchParallel) || result.fetchParallel < 0) {
|
||||
result.fetchParallel = 0;
|
||||
}
|
||||
core.debug(`fetch parallel = ${result.fetchParallel}`);
|
||||
// Show fetch progress
|
||||
result.showProgress =
|
||||
(core.getInput('show-progress') || 'true').toUpperCase() === 'TRUE';
|
||||
|
@ -1789,10 +1797,17 @@ function getInputs() {
|
|||
else if (submodulesString == 'TRUE') {
|
||||
result.submodules = true;
|
||||
}
|
||||
result.submodulesFetchJobs = Math.floor(Number(core.getInput('submodules-fetch-jobs') || '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 submodules-fetch-jobs = ${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