Skip to content

Commit

Permalink
enforce baseUrl to api.github.com if action used on GHES
Browse files Browse the repository at this point in the history
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
  • Loading branch information
crazy-max committed Jan 28, 2023
1 parent a024221 commit a8165e7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ const [owner, repo] = 'docker/buildx'.split('/');
export const getReleaseTag = async (tag: string, githubToken: string): Promise<Release> => {
return (
await github
.getOctokit(githubToken)
.getOctokit(githubToken, {
baseUrl: 'https://api.github.com'
})
.rest.repos.getReleaseByTag({
owner,
repo,
Expand All @@ -25,7 +27,9 @@ export const getReleaseTag = async (tag: string, githubToken: string): Promise<R
export const getLatestRelease = async (githubToken: string): Promise<Release> => {
return (
await github
.getOctokit(githubToken)
.getOctokit(githubToken, {
baseUrl: 'https://api.github.com'
})
.rest.repos.getLatestRelease({
owner,
repo
Expand Down

0 comments on commit a8165e7

Please sign in to comment.