private-action-loader
private-action-loader copied to clipboard
Dynamically detect node binary
Hi, as far as I understand this action requires node to be in the PATH. This is the case for GitHub's runners, because they have node preinstalled (at least on ubuntu). Runners that don't have node installed, could use eg. https://github.com/actions/setup-node to make sure node is available in the PATH.
However that seems unnecessary. node will be available from the action runner (see https://github.com/actions/runner/blob/be9632302ceef50bfb36ea998cea9c94c75e5d4d/docs/checks/nodejs.md) so installing it again should not be necessary. The only problem is that that location is not in the PATH.
My question is: Would it be possible to extend this action such that it can fall back to the pre-installed node binary by dynamically finding it? If this sounds like a good idea, I could possibly see if I can create the PR.
Side note: You can also extend the PATH manually, but I'm not sure how reliable the directory for node is:
- name: Setup node
run: echo "/actions-runner/externals/node12/bin" >> $GITHUB_PATH