mirror of
https://code.forgejo.org/actions/checkout.git
synced 2024-11-24 04:29:16 +01:00
Move reset and clean before update
This commit is contained in:
parent
ac7af06d80
commit
30cd0465ca
1 changed files with 4 additions and 2 deletions
|
@ -176,6 +176,10 @@ export async function getSource(settings: IGitSourceSettings): Promise<void> {
|
|||
await authHelper.configureGlobalAuth()
|
||||
core.endGroup()
|
||||
|
||||
// Clean existing submodules
|
||||
await git.submoduleReset(settings.nestedSubmodules)
|
||||
await git.submoduleClean(settings.nestedSubmodules)
|
||||
|
||||
// Checkout submodules
|
||||
core.startGroup('Fetching submodules')
|
||||
await git.submoduleSync(settings.nestedSubmodules)
|
||||
|
@ -183,8 +187,6 @@ export async function getSource(settings: IGitSourceSettings): Promise<void> {
|
|||
settings.fetchDepth,
|
||||
settings.nestedSubmodules
|
||||
)
|
||||
await git.submoduleReset(settings.nestedSubmodules)
|
||||
await git.submoduleClean(settings.nestedSubmodules)
|
||||
await git.submoduleForeach(
|
||||
'git config --local gc.auto 0',
|
||||
settings.nestedSubmodules
|
||||
|
|
Loading…
Reference in a new issue