mirror of
https://github.com/actions/checkout.git
synced 2025-06-08 09:11:33 +00:00
Add objectFormat setting to allow init()ing a repo with sha256
This commit is contained in:
parent
85e6279cec
commit
b9de40a228
9 changed files with 81 additions and 8 deletions
|
@ -161,5 +161,14 @@ export async function getInputs(): Promise<IGitSourceSettings> {
|
|||
result.githubServerUrl = core.getInput('github-server-url')
|
||||
core.debug(`GitHub Host URL = ${result.githubServerUrl}`)
|
||||
|
||||
// Object format
|
||||
const objectFormat = core.getInput('object-format')
|
||||
if (objectFormat) {
|
||||
if (objectFormat != 'sha1' && objectFormat != 'sha256') {
|
||||
throw Error(`Invalid object format '${objectFormat}'`)
|
||||
}
|
||||
result.objectFormat = objectFormat
|
||||
}
|
||||
|
||||
return result
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue