3 ms·
Then don't use the GitHub Actions defaults? Write your own Nodejs install script and use that instead. That's what I do and it's pretty stable: https://github.
by apatheticonion 1y ago
Then don't use the GitHub Actions defaults? Write your own Nodejs install script and use that instead.
That's what I do and it's pretty stable: https://github.com/alshdavid-templates/siteforge/blob/main/.github/workflows/deploy.yaml#L23 https://github.com/alshdavid-templates/siteforge/blob/main/....
- koolba 1y agoWhy both the pipe into sh and eval? The latter could handle all everything. Couple more thoughts and unsolicited feedback from a quick eyeball: - Use https:// - Wrap everything in a shell function to ensure that partial content is not executed. - Wrap variable substitutions with "${OUTPUT_DIR}" to prevent arg splitting if they contain whitespace. Line 124, `rm -rf $OUT_DIR_INSTALL` is pretty scary if invoked with whitespace in OUT_DIR. - Download nodejs tarball to temp directory and then extract them to prevent partial extraction
- apatheticonion 1y agoI could be wrong but I don't think you can set shell variables from the pipe, right? echo "export FOO=bar" | bash echo $FOO I am trying to set the variables in the current shell eval $(echo "echo 'export FOO=bar'" | bash) echo $FOO So my script writes variables to stdout and redirects everything else to stderr. I use this to update a `.bashrc` while also updating the current shell
- bramblerose 1y agouses: actions/checkout@v4 That uses the Node that is provided by GitHub, and that will break in the future.