fix(runner): install Node.js 20 on host before starting runner (required for JS actions in host mode)
This commit is contained in:
parent
9a5325a38d
commit
d73582e75d
1 changed files with 13 additions and 0 deletions
13
install.sh
13
install.sh
|
|
@ -755,8 +755,21 @@ do_forgejo_runner_install() {
|
|||
install_deps
|
||||
echo ""
|
||||
|
||||
# --- Node.js 20 (required for JS-based actions in host mode) ---
|
||||
log_step "Checking Node.js..."
|
||||
if node --version 2>/dev/null | grep -q "^v2"; then
|
||||
log_ok "Node.js $(node --version) already installed."
|
||||
else
|
||||
log_step "Installing Node.js 20 LTS..."
|
||||
curl -fsSL https://deb.nodesource.com/setup_20.x | bash - > /dev/null 2>&1
|
||||
apt-get install -y nodejs > /dev/null 2>&1
|
||||
log_ok "Node.js $(node --version) installed."
|
||||
fi
|
||||
echo ""
|
||||
|
||||
if docker ps -a --format '{{.Names}}' | grep -q "^${FORGEJO_RUNNER_CONTAINER}$"; then
|
||||
log_warn "Forgejo Runner is already installed."
|
||||
|
||||
return
|
||||
fi
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue