mirror of
https://github.com/docker/build-push-action.git
synced 2025-04-22 14:46:39 +02:00
Use latest buildx for git context test
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
parent
9c473659de
commit
1c3fedb652
3 changed files with 17 additions and 12 deletions
10
dist/index.js
generated
vendored
10
dist/index.js
generated
vendored
|
@ -1912,10 +1912,12 @@ function getBuildContext() {
|
|||
return '.';
|
||||
}
|
||||
try {
|
||||
const gitURL = git_url_parse_1.default(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 = git_url_parse_1.default(context);
|
||||
const gitRef = process.env['GIT_REF'] || '';
|
||||
if (gitRef) {
|
||||
return `${gitUrl.toString()}#${gitRef}`;
|
||||
}
|
||||
return gitUrl.toString();
|
||||
}
|
||||
catch (_a) {
|
||||
return context;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue