diff options
| author | eric sciple <ericsciple@users.noreply.github.com> | 2020-03-05 14:21:59 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-03-05 14:21:59 -0500 |
| commit | 7ca5766bfacc6c307d7e69645aa94ac44318af46 (patch) | |
| tree | 6cf0884441af3df11112f769de7e2bd6b2db727e /src/input-helper.ts | |
| parent | 05e00fbe0759a9339f189796ba5ceb3c4c78a556 (diff) | |
add support for submodules (#173)
Diffstat (limited to 'src/input-helper.ts')
| -rw-r--r-- | src/input-helper.ts | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/src/input-helper.ts b/src/input-helper.ts index e50dbc5..3769350 100644 --- a/src/input-helper.ts +++ b/src/input-helper.ts @@ -85,13 +85,6 @@ export function getInputs(): IGitSourceSettings { result.clean = (core.getInput('clean') || 'true').toUpperCase() === 'TRUE' core.debug(`clean = ${result.clean}`) - // Submodules - if (core.getInput('submodules')) { - throw new Error( - "The input 'submodules' is not supported in actions/checkout@v2" - ) - } - // Fetch depth result.fetchDepth = Math.floor(Number(core.getInput('fetch-depth') || '1')) if (isNaN(result.fetchDepth) || result.fetchDepth < 0) { @@ -103,6 +96,19 @@ export function getInputs(): IGitSourceSettings { result.lfs = (core.getInput('lfs') || 'false').toUpperCase() === 'TRUE' core.debug(`lfs = ${result.lfs}`) + // Submodules + result.submodules = false + result.nestedSubmodules = false + const submodulesString = (core.getInput('submodules') || '').toUpperCase() + if (submodulesString == 'RECURSIVE') { + result.submodules = true + result.nestedSubmodules = true + } else if (submodulesString == 'TRUE') { + result.submodules = true + } + core.debug(`submodules = ${result.submodules}`) + core.debug(`recursive submodules = ${result.nestedSubmodules}`) + // Auth token result.authToken = core.getInput('token') |
