1
0
Fork 0
mirror of https://code.forgejo.org/actions/checkout.git synced 2025-04-26 22:09:55 +02:00

determine default branch (#278)

This commit is contained in:
eric sciple 2020-06-16 13:41:01 -04:00 committed by GitHub
parent 453ee27fca
commit 00a3be8934
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 78 additions and 18 deletions

View file

@ -68,10 +68,6 @@ export function getInputs(): IGitSourceSettings {
result.ref = `refs/heads/${result.ref}`
}
}
if (!result.ref && !result.commit) {
result.ref = 'refs/heads/master'
}
}
// SHA?
else if (result.ref.match(/^[0-9a-fA-F]{40}$/)) {
@ -110,7 +106,7 @@ export function getInputs(): IGitSourceSettings {
core.debug(`recursive submodules = ${result.nestedSubmodules}`)
// Auth token
result.authToken = core.getInput('token')
result.authToken = core.getInput('token', {required: true})
// SSH
result.sshKey = core.getInput('ssh-key')