0
0
Fork 0
mirror of https://github.com/actions/checkout.git synced 2025-11-28 01:51:57 +02:00

Default branch checkout option

This commit is contained in:
alexanderkranga 2024-02-19 18:20:02 +02:00
parent e72243fb91
commit 5bbdf118df
5 changed files with 48 additions and 77 deletions

View file

@ -78,10 +78,11 @@ export async function getInputs(): Promise<IGitSourceSettings> {
core.debug(`ref = '${result.ref}'`)
core.debug(`commit = '${result.commit}'`)
// Default ref on error
result.defaultRefOnError =
(core.getInput('default-ref-on-error') || 'true').toUpperCase() === 'TRUE'
core.debug(`default-ref-on-error = '${result.defaultRefOnError}'`)
// Default branch checkout
result.defaultBranchCheckout =
(core.getInput('default-branch-checkout') || 'true').toUpperCase() ===
'TRUE'
core.debug(`default-branch-checkout = '${result.defaultBranchCheckout}'`)
// Clean
result.clean = (core.getInput('clean') || 'true').toUpperCase() === 'TRUE'