POST /repos/owner/repo/issues//comments
^^
The same workflow code works fine on self-hosted runners using the shared volume (plain kubernetes mode) where event.json is properly provided.
Step that fails.
- name: Post PR Comment
if: github.event_name == 'pull_request'
uses: actions/github-script@v7
with:
script: |
const web_build_artifact_id = process.env.WEB_BUILD_ARTIFACT_ID;
const artifactUrl = `https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}/artifacts/${web_build_artifact_id}`;
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `🔗 [Download Web Build](${artifactUrl})\n\nThis build will be available for 5 days.`
});
Run actions/github-script@v7
with:
script: const web_build_artifact_id = process.env.WEB_BUILD_ARTIFACT_ID;
const artifactUrl = `[https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}/artifacts/${web_build_artifact_id}`;](https://github.com/$%7Bcontext.repo.owner%7D/$%7Bcontext.repo.repo%7D/actions/runs/$%7Bcontext.runId%7D/artifacts/$%7Bweb_build_artifact_id%7D%60;)
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `🔗 [Download Web Build](${artifactUrl})\n\nThis build will be available for 5 days.`
});
github-token: ***
debug: false
user-agent: actions/github-script
result-encoding: json
retries: 0
retry-exempt-status-codes: 400,401,403,404,422
env:
WEB_BUILD_ARTIFACT_ID: 4676599843
Run '/home/runner/k8s-novolume/custom-index.js'
shell: /home/runner/externals/node20/bin/node {0}
(node:1021) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
GITHUB_EVENT_PATH /github/workflow/event.json does not exist
GITHUB_EVENT_PATH /github/workflow/event.json does not exist
RequestError [HttpError]: Not Found
at /__w/_actions/actions/github-script/v7/dist/index.js:9537:21
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
status: 404,
response: {
url: 'https://api.github.com/repos/chtbks/fluttershy/issues//comments',
status: 404,
headers: {
'access-control-allow-origin': '*',
'access-control-expose-headers': 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset',
connection: 'close',
'content-security-policy': "default-src 'none'",
'content-type': 'application/json; charset=utf-8',
date: 'Tue, 25 Nov 2025 17:36:13 GMT',
'referrer-policy': 'origin-when-cross-origin, strict-origin-when-cross-origin',
server: 'github.com',
'strict-transport-security': 'max-age=31536000; includeSubdomains; preload',
vary: 'Accept-Encoding, Accept, X-Requested-With',
'x-content-type-options': 'nosniff',
'x-frame-options': 'deny',
'x-github-media-type': 'github.v3; format=json',
'x-github-request-id': '7479:19EAFE:7269:1FD35:6925E90D',
'x-xss-protection': '0'
},
data: {
message: 'Not Found',
documentation_url: 'https://docs.github.com/rest',
status: '404'
}
},
request: {
method: 'POST',
url: 'https://api.github.com/repos/chtbks/fluttershy/issues//comments',
headers: {
accept: 'application/vnd.github.v3+json',
'user-agent': 'actions/github-script octokit-core.js/5.0.1 Node.js/20.19.5 (linux; x64)',
authorization: 'token [REDACTED]',
'content-type': 'application/json; charset=utf-8'
},
body: '{"body":"🔗 [Download Web Build](https://github.com/chtbks/fluttershy/actions/runs/19678452013/artifacts/4676599843)\\n\\nThis build will be available for 5 days."}',
request: {
agent: [Agent],
fetch: [Function: proxyFetch],
hook: [Function: bound bound register]
}
}
}
Error: Unhandled error: HttpError: Not Found
Error: Error: failed to run script step: Error: command terminated with non-zero exit code: command terminated with exit code 1
Error: Process completed with exit code 1.
Error: Executing the custom container implementation failed. Please contact your self hosted runner administrator.
I'll take a stab at a fix.
The
actions/github-script@v7action fails on runners with thekubernetes-novolumemode because the GitHub event context file isn't available at the expected location. The runner reportsGITHUB_EVENT_PATH /github/workflow/event.json does not exist. Withoutevent.json-context.issue,context.payload, and other event-based properties are undefined when usinggithub-script(and likely other actions that rely onevent.jsonfound atGITHUB_EVENT_PATH).This results in problems like
context.issue.numberbeing missing, which in turn produces malformed API calls such as:The same workflow code works fine on self-hosted runners using the shared volume (plain
kubernetesmode) whereevent.jsonis properly provided.Step that fails.
Log:
I'll take a stab at a fix.