fix: dnf support in setup-node + setup-aws, node label t3.medium

- setup-node: detect dnf (Amazon Linux) alongside apk/apt-get
- setup-aws: detect dnf for official installer
- node Spot bumped to t3.medium (4GB) — Docusaurus OOM'd on t3.small
This commit is contained in:
2026-05-23 12:37:25 +01:00
parent 29957c6239
commit 84d0ebff48
5 changed files with 23 additions and 12 deletions
+16 -5
View File
@@ -1,7 +1,7 @@
# tinqs/ci/setup-node — Tinqs Studio CI
# Installs Node.js and optionally pnpm.
# Detects Alpine vs Debian and uses the right package manager.
# Skips install if the correct major version is already present (pre-baked runner image).
# Detects Alpine (apk), Debian (apt-get), and Amazon Linux/RHEL (dnf).
# Skips install if the correct major version is already present (pre-baked AMI).
# Composite action — runs directly on the host.
# Author: Ozan + Claude Code — 2026-05-22
@@ -29,10 +29,17 @@ runs:
if [ "$CURRENT" = "$NODE_VERSION" ]; then
echo "Node $NODE_VERSION already installed"
node --version
if [ "$INSTALL_PNPM" = "true" ] && command -v pnpm &>/dev/null; then
pnpm --version
exit 0
if [ "$INSTALL_PNPM" = "true" ]; then
if command -v pnpm &>/dev/null; then
pnpm --version
exit 0
else
npm install -g pnpm
pnpm --version
exit 0
fi
fi
exit 0
fi
fi
@@ -40,6 +47,10 @@ runs:
if command -v apk &>/dev/null; then
# Alpine
apk add --no-cache nodejs npm
elif command -v dnf &>/dev/null; then
# Amazon Linux / RHEL / Fedora
curl -fsSL "https://rpm.nodesource.com/setup_${NODE_VERSION}.x" | bash -
dnf install -y nodejs
elif command -v apt-get &>/dev/null; then
# Debian/Ubuntu
curl -fsSL "https://deb.nodesource.com/setup_${NODE_VERSION}.x" | bash -