mirror of
https://github.com/docker/build-push-action.git
synced 2025-06-19 17:27:12 +02:00
Use latest buildx for git context test
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
@ -72,10 +72,12 @@ async function getBuildContext(): Promise<string> {
|
||||
return '.';
|
||||
}
|
||||
try {
|
||||
const gitURL = gitUrlParse(context);
|
||||
gitURL.token = gitURL.token || process.env['GIT_TOKEN'] || process.env['GITHUB_TOKEN'] || '';
|
||||
gitURL.ref = gitURL.ref || process.env['GIT_REF'] || process.env['GITHUB_REF'] || '';
|
||||
return gitURL.toString();
|
||||
const gitUrl = gitUrlParse(context);
|
||||
const gitRef = process.env['GIT_REF'] || '';
|
||||
if (gitRef) {
|
||||
return `${gitUrl.toString()}#${gitRef}`;
|
||||
}
|
||||
return gitUrl.toString();
|
||||
} catch {
|
||||
return context;
|
||||
}
|
||||
|
Reference in New Issue
Block a user