Add support for SHA256 repositories

New input parameter 'repo-sha256' to set the Git object format
to "sha256" when initializing a Git repository.
This commit is contained in:
Elisei Roca 2024-12-19 00:10:20 +01:00
parent cbb722410c
commit 57e16d7d9f
7 changed files with 39 additions and 7 deletions

View file

@ -110,7 +110,7 @@ export async function getSource(settings: IGitSourceSettings): Promise<void> {
!fsHelper.directoryExistsSync(path.join(settings.repositoryPath, '.git'))
) {
core.startGroup('Initializing the repository')
await git.init()
await git.init(settings.repoSHA256)
await git.remoteAdd('origin', repositoryUrl)
core.endGroup()
}