Skip to content

Commit a8165e7

Browse files
committed
enforce baseUrl to api.github.com if action used on GHES
Signed-off-by: CrazyMax <[email protected]>
1 parent a024221 commit a8165e7

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/github.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ const [owner, repo] = 'docker/buildx'.split('/');
1010
export const getReleaseTag = async (tag: string, githubToken: string): Promise<Release> => {
1111
return (
1212
await github
13-
.getOctokit(githubToken)
13+
.getOctokit(githubToken, {
14+
baseUrl: 'https://api.github.com'
15+
})
1416
.rest.repos.getReleaseByTag({
1517
owner,
1618
repo,
@@ -25,7 +27,9 @@ export const getReleaseTag = async (tag: string, githubToken: string): Promise<R
2527
export const getLatestRelease = async (githubToken: string): Promise<Release> => {
2628
return (
2729
await github
28-
.getOctokit(githubToken)
30+
.getOctokit(githubToken, {
31+
baseUrl: 'https://api.github.com'
32+
})
2933
.rest.repos.getLatestRelease({
3034
owner,
3135
repo

0 commit comments

Comments
 (0)