git: use GitHub API for remoteSha if token provided

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax
2023-06-12 07:51:32 +02:00
parent acd3c9df19
commit b2a51dd6b4
5 changed files with 63 additions and 3 deletions

View File

@@ -73,7 +73,7 @@ export class Install {
if (ref.match(/^[0-9a-fA-F]{40}$/)) {
vspec = ref;
} else {
vspec = await Git.remoteSha(repo, ref);
vspec = await Git.remoteSha(repo, ref, process.env.GIT_AUTH_TOKEN);
}
core.debug(`Install.build: tool version spec ${vspec}`);