Skip to content

Commit

Permalink
fix(tool-cache): support enterprise instances
Browse files Browse the repository at this point in the history
Remove hard code api.github.com reference in tool-cache so that it works
when used in GitHub Enterprise instances.

Fixes actions#644
  • Loading branch information
stevenh committed Jan 18, 2022
1 parent daf8bb0 commit 584c6fe
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/tool-cache/src/tool-cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,8 @@ export async function getManifestFromRepo(
branch = 'master'
): Promise<IToolRelease[]> {
let releases: IToolRelease[] = []
const treeUrl = `https://api.github.com/repos/${owner}/${repo}/git/trees/${branch}`
const base = process.env['GITHUB_API_URL'] || 'https://api.github.com'
const treeUrl = `${base}/repos/${owner}/${repo}/git/trees/${branch}`

const http: httpm.HttpClient = new httpm.HttpClient('tool-cache')
const headers: IHeaders = {}
Expand Down

0 comments on commit 584c6fe

Please sign in to comment.