From a8165e7b70928041b960d14b5754033e2a8d2525 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Sat, 28 Jan 2023 02:44:08 +0100 Subject: [PATCH] enforce baseUrl to api.github.com if action used on GHES Signed-off-by: CrazyMax --- src/github.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/github.ts b/src/github.ts index a1a2757..c819fd9 100644 --- a/src/github.ts +++ b/src/github.ts @@ -10,7 +10,9 @@ const [owner, repo] = 'docker/buildx'.split('/'); export const getReleaseTag = async (tag: string, githubToken: string): Promise => { return ( await github - .getOctokit(githubToken) + .getOctokit(githubToken, { + baseUrl: 'https://api.github.com' + }) .rest.repos.getReleaseByTag({ owner, repo, @@ -25,7 +27,9 @@ export const getReleaseTag = async (tag: string, githubToken: string): Promise => { return ( await github - .getOctokit(githubToken) + .getOctokit(githubToken, { + baseUrl: 'https://api.github.com' + }) .rest.repos.getLatestRelease({ owner, repo