mirror of
https://code.forgejo.org/actions/checkout.git
synced 2025-04-27 06:19:54 +02:00
Allow configuration of submodule.fetchJobs
This commit is contained in:
parent
b4ffde65f4
commit
2bd5ef5487
11 changed files with 271 additions and 102 deletions
|
@ -232,6 +232,7 @@ export async function getSource(settings: IGitSourceSettings): Promise<void> {
|
|||
|
||||
// Checkout submodules
|
||||
core.startGroup('Fetching submodules')
|
||||
await git.config('submodule.fetchJobs', settings.submodulesFetchJobs)
|
||||
await git.submoduleSync(settings.nestedSubmodules)
|
||||
await git.submoduleUpdate(settings.fetchDepth, settings.nestedSubmodules)
|
||||
await git.submoduleForeach(
|
||||
|
|
|
@ -74,6 +74,11 @@ export interface IGitSourceSettings {
|
|||
*/
|
||||
nestedSubmodules: boolean
|
||||
|
||||
/**
|
||||
* Indicates the number of parallel jobs to use when fetching submodules
|
||||
*/
|
||||
submodulesFetchJobs: string
|
||||
|
||||
/**
|
||||
* The auth token to use when fetching the repository
|
||||
*/
|
||||
|
|
|
@ -132,8 +132,10 @@ export async function getInputs(): Promise<IGitSourceSettings> {
|
|||
} else if (submodulesString == 'TRUE') {
|
||||
result.submodules = true
|
||||
}
|
||||
result.submodulesFetchJobs = core.getInput('submodulesFetchJobs') || '1'
|
||||
core.debug(`submodules = ${result.submodules}`)
|
||||
core.debug(`recursive submodules = ${result.nestedSubmodules}`)
|
||||
core.debug(`submodules fetchJobs= ${result.submodulesFetchJobs}`)
|
||||
|
||||
// Auth token
|
||||
result.authToken = core.getInput('token', {required: true})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue