Fix: installa npm se assente, rimuove validate.yml
This commit is contained in:
@@ -10,7 +10,7 @@ inputs:
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Verifica prerequisiti
|
||||
- name: Verifica prerequisiti e installa npm se assente
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
@@ -19,8 +19,16 @@ runs:
|
||||
exit 1
|
||||
fi
|
||||
if ! command -v npm &> /dev/null; then
|
||||
echo "ERRORE: npm non trovato."
|
||||
exit 1
|
||||
echo "npm non trovato, tentativo di installazione..."
|
||||
if command -v apt-get &> /dev/null; then
|
||||
apt-get update -qq && apt-get install -y -qq npm 2>&1 || true
|
||||
elif command -v apk &> /dev/null; then
|
||||
apk add --no-cache npm 2>&1 || true
|
||||
fi
|
||||
if ! command -v npm &> /dev/null; then
|
||||
echo "ERRORE: impossibile installare npm."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
echo "node $(node --version), npm $(npm --version)"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user