1
0
Fork 0
mirror of https://github.com/actions/checkout.git synced 2025-05-07 08:50:02 +00:00

clean-submodules

This commit is contained in:
Hazel 2024-01-29 15:54:16 +00:00
parent fc0a6fcb57
commit 1f1d74371e
No known key found for this signature in database
GPG key ID: C7C5A3D1A085B70F
7 changed files with 41 additions and 13 deletions

View file

@ -230,6 +230,11 @@ export async function getSource(settings: IGitSourceSettings): Promise<void> {
await authHelper.configureGlobalAuth()
core.endGroup()
if (settings.cleanSubmodules) {
core.info('Cleaning the repository again before fetching submodules')
await gitDirectoryHelper.cleanExistingDirectory(git, settings.repositoryPath)
}
// Checkout submodules
core.startGroup('Fetching submodules')
await git.submoduleSync(settings.nestedSubmodules)