install node all
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 1s
checks / Check & Test (Frontend + Backend) (push) Failing after 1s
Gitea Actions Demo / Explore-Gitea-Actions (pull_request) Successful in 4s
checks / Check & Test (Frontend + Backend) (pull_request) Failing after 2s
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 1s
checks / Check & Test (Frontend + Backend) (push) Failing after 1s
Gitea Actions Demo / Explore-Gitea-Actions (pull_request) Successful in 4s
checks / Check & Test (Frontend + Backend) (pull_request) Failing after 2s
This commit is contained in:
@ -21,11 +21,38 @@ jobs:
|
||||
|
||||
- name: Install Node.js, npm, and Yarn
|
||||
run: |
|
||||
apt update
|
||||
apt install -y curl
|
||||
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
|
||||
apt install -y nodejs
|
||||
npm install -g yarn
|
||||
set -e
|
||||
echo "Detecting OS and installing Node.js, npm, and Yarn..."
|
||||
|
||||
if command -v apt >/dev/null 2>&1; then
|
||||
echo "Using apt package manager (Debian/Ubuntu)..."
|
||||
apt update -y
|
||||
apt install -y curl ca-certificates
|
||||
curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
|
||||
apt install -y nodejs
|
||||
npm install -g yarn
|
||||
|
||||
elif command -v apk >/dev/null 2>&1; then
|
||||
echo "Using apk package manager (Alpine)..."
|
||||
apk update
|
||||
apk add --no-cache curl nodejs npm
|
||||
npm install -g yarn
|
||||
|
||||
elif command -v dnf >/dev/null 2>&1; then
|
||||
echo "Using dnf package manager (Fedora/RHEL)..."
|
||||
dnf install -y curl ca-certificates nodejs npm
|
||||
npm install -g yarn
|
||||
|
||||
else
|
||||
echo "No supported package manager found (apt, apk, dnf)."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Node.js, npm, and Yarn installed successfully."
|
||||
node -v
|
||||
npm -v
|
||||
yarn -v
|
||||
|
||||
|
||||
- name: Checkout repository manually
|
||||
env:
|
||||
@ -40,9 +67,6 @@ jobs:
|
||||
- name: List repo files and dependencies versions
|
||||
run: |
|
||||
ls .
|
||||
node -v
|
||||
npm -v
|
||||
yarn -v
|
||||
|
||||
- name: Done
|
||||
run: echo "Workflow finished."
|
||||
|
||||
Reference in New Issue
Block a user