Open
Description
When trying to upgrade the GitHub checkout
action from v3 to v4 using self-hosted runners with Kubernetes mode, I consistently get the following error:
Run '/home/runner/k8s/index.js'
shell: /home/runner/externals/node20/bin/node {0}
undefined:1
SyntaxError: Unexpected end of JSON input
at JSON.parse (<anonymous>)
at new Context (/__w/_actions/actions/checkout/v4/dist/index.js:4766:37)
at 3030 (/__w/_actions/actions/checkout/v4/dist/index.js:4935:19)
at __nccwpck_require__ (/__w/_actions/actions/checkout/v4/dist/index.js:18273:43)
at 5438 (/__w/_actions/actions/checkout/v4/dist/index.js:4836:17)
at __nccwpck_require__ (/__w/_actions/actions/checkout/v4/dist/index.js:18273:43)
at 8601 (/__w/_actions/actions/checkout/v4/dist/index.js:1921:[29](https://github.com/<redacted>/actions/runs/8252557433/job/22600517448?pr=42#step:3:30))
at __nccwpck_require__ (/__w/_actions/actions/checkout/v4/dist/index.js:18273:43)
at 738 (/__w/_actions/actions/checkout/v4/dist/index.js:477:[32](https://github.com/<redacted>/actions/runs/8252557433/job/22600517448?pr=42#step:3:34))
at __nccwpck_require__ (/__w/_actions/actions/checkout/v4/dist/index.js:18273:43)
Node.js v20.8.1
I've tried upgrading the internal runner node version from 16 to 20 using:
env:
- name: ACTIONS_RUNNER_FORCED_INTERNAL_NODE_VERSION
value: node20
But I still see the same error. I believe this is a somewhat urgent issue as GitHub actions won't support node16 after Spring 2024 anymore (post) and we will need to upgrade checkout
actions from v3 to v4.
Thank you!