Open vamsi877 opened 6 months ago
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.
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 (
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?
how to pass custom github api url to the action, as it is always using api.github.com to upload the dependency-graph.