3
0
Fork 0
mirror of https://code.forgejo.org/actions/checkout.git synced 2025-07-27 08:27:56 +00:00

add shallow-since option

This commit is contained in:
satotake 2021-10-20 23:56:37 +09:00
parent 3d677ac575
commit b0b939aaa5
8 changed files with 52 additions and 9 deletions

View file

@ -88,6 +88,16 @@ export function getInputs(): IGitSourceSettings {
}
core.debug(`fetch depth = ${result.fetchDepth}`)
// Shallow since
result.shallowSince = core.getInput('shallow-since')
core.debug(`shallow since = ${result.shallowSince}`)
if (result.fetchDepth > 0 && result.shallowSince) {
throw new Error(
'`fetch-depath` and `shallow-since` cannot be used at the same time'
)
}
// LFS
result.lfs = (core.getInput('lfs') || 'false').toUpperCase() === 'TRUE'
core.debug(`lfs = ${result.lfs}`)