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:
parent
453ee27fca
commit
00a3be8934
7 changed files with 78 additions and 18 deletions
|
@ -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')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue