Open gaborho opened 1 year ago
After adding NODE_DEBUG: http environment variable to my workflow, I can clearly see that the action is talking to api.github.com and not to my GHES instance. I tried to set GITHUB_API_URL as this commit suggests, but did not helped. Can you please add GHES support @JasonEtco ?
I've got this working and interacting with my GitHub Enterprise Server, but its not only a fix here.
Working backwards, this code relies on https://github.com/JasonEtco/actions-toolkit where we use the run
method here: https://github.com/JasonEtco/build-and-tag-action/blob/8aebd433ae6d9f3d7433205d11740c3f5163db8e/src/index.ts#L4
The constructor then create the github
property using the Octokit
class here: https://github.com/JasonEtco/actions-toolkit/blob/c6c7208c521db3b7418dbc9cf5eab282a501250e/src/index.ts#L142
This Octokit object was the issue, it doesn't know how to reach my GitHub Enterprise Server
In my copy of the code, I changed this
this.github = new Octokit({ auth: `token ${this.token}` })
becomes
this.github = new Octokit({
auth: `token ${this.token}`,
baseUrl: `${process.env.GITHUB_URL}api/v3`
})
With this change, the Octokit object now knows how to reach my enterprise server
Hi, is this action comptabile with GitHub Enterprise? When I try to use it, I receive the following error:
My configuration:
I'm pretty sure I hand over correctly the token. The issue is somewhere here, with the createTree API.
https://github.com/JasonEtco/build-and-tag-action/blob/main/src/lib/create-commit.ts#L11
Should this action work with GHES 3.6?
Thank you.