@@ -15,6 +15,23 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
# Host runner (ubuntu-latest:host) does not load ~/.bashrc — nvm is invisible unless we
|
||||
# load it here. Persist PATH for all later steps (actions/setup-node, npm, etc.).
|
||||
- name: Put Node on PATH (NVM for host runner)
|
||||
run: |
|
||||
set -euo pipefail
|
||||
NVM_DIR="${NVM_DIR:-$HOME/.nvm}"
|
||||
if [ ! -s "$NVM_DIR/nvm.sh" ]; then
|
||||
echo "NVM not found at $NVM_DIR/nvm.sh. Install nvm for the runner user or add Node to /usr/local/bin." >&2
|
||||
exit 1
|
||||
fi
|
||||
# shellcheck source=/dev/null
|
||||
. "$NVM_DIR/nvm.sh"
|
||||
nvm use 20
|
||||
echo "PATH=$PATH" >> "$GITHUB_ENV"
|
||||
command -v node
|
||||
node -v
|
||||
|
||||
# ---------------- JAVA (Gradle + SonarScanner need JDK on Ubuntu) ----------------
|
||||
- name: Setup Java
|
||||
uses: actions/setup-java@v4
|
||||
|
||||
Reference in New Issue
Block a user