3
0
Fork 0
mirror of https://gitea.com/docker/build-push-action.git synced 2024-11-29 12:59:37 +01:00

Handle GitHub server URL for default context

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax 2021-04-01 20:07:51 +02:00
parent 9cf6eb2b16
commit 8f5c91aad9
No known key found for this signature in database
GPG key ID: 3248E46B6BB8C7F7
2 changed files with 2 additions and 2 deletions

2
dist/index.js generated vendored
View file

@ -13014,7 +13014,7 @@ let _defaultContext, _tmpDir;
function defaultContext() {
var _a, _b;
if (!_defaultContext) {
_defaultContext = `https://github.com/${github.context.repo.owner}/${github.context.repo.repo}.git#${(_b = (_a = github.context) === null || _a === void 0 ? void 0 : _a.ref) === null || _b === void 0 ? void 0 : _b.replace(/^refs\//, '')}`;
_defaultContext = `${process.env.GITHUB_SERVER_URL || 'https://github.com'}/${github.context.repo.owner}/${github.context.repo.repo}.git#${(_b = (_a = github.context) === null || _a === void 0 ? void 0 : _a.ref) === null || _b === void 0 ? void 0 : _b.replace(/^refs\//, '')}`;
}
return _defaultContext;
}

View file

@ -37,7 +37,7 @@ export interface Inputs {
export function defaultContext(): string {
if (!_defaultContext) {
_defaultContext = `https://github.com/${github.context.repo.owner}/${
_defaultContext = `${process.env.GITHUB_SERVER_URL || 'https://github.com'}/${github.context.repo.owner}/${
github.context.repo.repo
}.git#${github.context?.ref?.replace(/^refs\//, '')}`;
}