Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support to set GITHUB_API_URL as input to the action #81

Open
vamsi877 opened this issue May 30, 2024 · 3 comments
Open

Support to set GITHUB_API_URL as input to the action #81

vamsi877 opened this issue May 30, 2024 · 3 comments

Comments

@vamsi877
Copy link

how to pass custom github api url to the action, as it is always using api.github.com to upload the dependency-graph.

@peter-murray
Copy link
Contributor

It reads the API URL from the actions runtime environment. The runner knows what it should be point at and that is what is being utilized.

@vamsi877
Copy link
Author

vamsi877 commented Jul 3, 2024

I am running action workflow on my enterprise GHES, instead of using my GHES url it is using api.github.com url while submitting the dependency snapshot, see below log trace ...

Error: HTTP Status 500 for request POST https://api.github.com/repos/buildNow-sandbox-poc/poc-build-maven/dependency-graph/snapshots
Error: request to **https://api.github.com/**repos/buildNow-sandbox-poc/poc-build-maven/dependency-graph/snapshots failed, reason: getaddrinfo ENOTFOUND api.github.com
Error: HttpError: request to https://api.github.com/repos/buildNow-sandbox-poc/poc-build-maven/dependency-graph/snapshots failed, reason: getaddrinfo ENOTFOUND api.github.com
at /var/lib/github-runner/buildnow-java-runner/_work/_actions/advanced-security/maven-dependency-submission-action/571e99aab1055c2e71a1e2309b9691de18d6b7d6/webpack:/maven-dependency-tree-action/node_modules/@github/dependency-submission-toolkit/dist/index.js:5339:1
at processTicksAndRejections (node:internal/process/task_queues:96:5)

/var/lib/github-runner/buildnow-java-runner/_work/_actions/advanced-security/maven-dependency-submission-action/571e99aab1055c2e71a1e2309b9691de18d6b7d6/webpack:/maven-dependency-tree-action/node_modules/@github/dependency-submission-toolkit/dist/index.js:396
function rejected(value) { try { step(generator"throw"); } catch (e) { reject(e); } }
^
Error: Failed to submit snapshot: HttpError: request to https://api.github.com/repos/buildNow-sandbox-poc/poc-build-maven/dependency-graph/snapshots failed, reason: getaddrinfo ENOTFOUND api.github.com
at /var/lib/github-runner/buildnow-java-runner/_work/_actions/advanced-security/maven-dependency-submission-action/571e99aab1055c2e71a1e2309b9691de18d6b7d6/webpack:/maven-dependency-tree-action/node_modules/@github/dependency-submission-toolkit/dist/index.js:499:1
at Generator.throw ()
at rejected (/var/lib/github-runner/buildnow-java-runner/_work/_actions/advanced-security/maven-dependency-submission-action/571e99aab1055c2e71a1e2309b9691de18d6b7d6/webpack:/maven-dependency-tree-action/node_modules/@github/dependency-submission-toolkit/dist/index.js:396:1)
at processTicksAndRejections (node:internal/process/task_queues:96:5)

@peter-murray
Copy link
Contributor

I cannot reproduce this, I have tested against GHES 3.13 using this action and with no parameters it correctly uploads to the GHES server the findings. I was using v4 of this action.

What version of the action are you using? Have you got any environment variables set that could be impacting the default GitHub server URLs?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants