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:
Binary file not shown.
Binary file not shown.
@@ -101,7 +101,7 @@ type spotConfig struct {
|
|||||||
|
|
||||||
var labelToSpot = map[string]spotConfig{
|
var labelToSpot = map[string]spotConfig{
|
||||||
"go": {InstanceType: "t3.small", MaxPrice: "0.02"},
|
"go": {InstanceType: "t3.small", MaxPrice: "0.02"},
|
||||||
"node": {InstanceType: "t3.small", MaxPrice: "0.02"},
|
"node": {InstanceType: "t3.medium", MaxPrice: "0.04"},
|
||||||
"docker": {InstanceType: "t3.medium", MaxPrice: "0.04"},
|
"docker": {InstanceType: "t3.medium", MaxPrice: "0.04"},
|
||||||
"deploy": {InstanceType: "t3.micro", MaxPrice: "0.01"},
|
"deploy": {InstanceType: "t3.micro", MaxPrice: "0.01"},
|
||||||
"godot": {InstanceType: "t3.medium", MaxPrice: "0.04"},
|
"godot": {InstanceType: "t3.medium", MaxPrice: "0.04"},
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
# tinqs/ci/setup-aws — Tinqs Studio CI
|
# tinqs/ci/setup-aws — Tinqs Studio CI
|
||||||
# Installs AWS CLI and optionally logs into ECR.
|
# Installs AWS CLI and optionally logs into ECR.
|
||||||
# Detects Alpine (musl) vs Debian (glibc) and uses the right install method.
|
# Detects Alpine (apk/pip), Debian (apt-get), and Amazon Linux/RHEL (dnf).
|
||||||
# Credentials come from the runner environment (IAM task role on Fargate, instance
|
# Skips install if AWS CLI is already present (pre-baked AMI).
|
||||||
# profile on EC2/Lightsail) — no explicit key configuration needed.
|
# Credentials come from the runner environment (IAM instance profile on EC2,
|
||||||
|
# task role on Fargate) — no explicit key configuration needed.
|
||||||
# Composite action — runs directly on the host.
|
# Composite action — runs directly on the host.
|
||||||
# Author: Ozan + Claude Code — 2026-05-22
|
# Author: Ozan + Claude Code — 2026-05-22
|
||||||
|
|
||||||
@@ -35,9 +36,8 @@ runs:
|
|||||||
# Alpine — use pip (AWS CLI v2 binary needs glibc)
|
# Alpine — use pip (AWS CLI v2 binary needs glibc)
|
||||||
apk add --no-cache python3 py3-pip
|
apk add --no-cache python3 py3-pip
|
||||||
pip3 install --break-system-packages awscli 2>/dev/null || pip3 install awscli
|
pip3 install --break-system-packages awscli 2>/dev/null || pip3 install awscli
|
||||||
elif command -v apt-get &>/dev/null; then
|
elif command -v dnf &>/dev/null || command -v apt-get &>/dev/null; then
|
||||||
# Debian/Ubuntu — use official installer
|
# Amazon Linux / Debian — official installer (glibc available)
|
||||||
apt-get update && apt-get install -y unzip curl
|
|
||||||
curl -fsSL https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip -o /tmp/awscli.zip
|
curl -fsSL https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip -o /tmp/awscli.zip
|
||||||
unzip -q /tmp/awscli.zip -d /tmp/aws-install
|
unzip -q /tmp/awscli.zip -d /tmp/aws-install
|
||||||
/tmp/aws-install/aws/install
|
/tmp/aws-install/aws/install
|
||||||
|
|||||||
+16
-5
@@ -1,7 +1,7 @@
|
|||||||
# tinqs/ci/setup-node — Tinqs Studio CI
|
# tinqs/ci/setup-node — Tinqs Studio CI
|
||||||
# Installs Node.js and optionally pnpm.
|
# Installs Node.js and optionally pnpm.
|
||||||
# Detects Alpine vs Debian and uses the right package manager.
|
# Detects Alpine (apk), Debian (apt-get), and Amazon Linux/RHEL (dnf).
|
||||||
# Skips install if the correct major version is already present (pre-baked runner image).
|
# Skips install if the correct major version is already present (pre-baked AMI).
|
||||||
# Composite action — runs directly on the host.
|
# Composite action — runs directly on the host.
|
||||||
# Author: Ozan + Claude Code — 2026-05-22
|
# Author: Ozan + Claude Code — 2026-05-22
|
||||||
|
|
||||||
@@ -29,10 +29,17 @@ runs:
|
|||||||
if [ "$CURRENT" = "$NODE_VERSION" ]; then
|
if [ "$CURRENT" = "$NODE_VERSION" ]; then
|
||||||
echo "Node $NODE_VERSION already installed"
|
echo "Node $NODE_VERSION already installed"
|
||||||
node --version
|
node --version
|
||||||
if [ "$INSTALL_PNPM" = "true" ] && command -v pnpm &>/dev/null; then
|
if [ "$INSTALL_PNPM" = "true" ]; then
|
||||||
pnpm --version
|
if command -v pnpm &>/dev/null; then
|
||||||
exit 0
|
pnpm --version
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
npm install -g pnpm
|
||||||
|
pnpm --version
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
exit 0
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -40,6 +47,10 @@ runs:
|
|||||||
if command -v apk &>/dev/null; then
|
if command -v apk &>/dev/null; then
|
||||||
# Alpine
|
# Alpine
|
||||||
apk add --no-cache nodejs npm
|
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
|
elif command -v apt-get &>/dev/null; then
|
||||||
# Debian/Ubuntu
|
# Debian/Ubuntu
|
||||||
curl -fsSL "https://deb.nodesource.com/setup_${NODE_VERSION}.x" | bash -
|
curl -fsSL "https://deb.nodesource.com/setup_${NODE_VERSION}.x" | bash -
|
||||||
|
|||||||
Reference in New Issue
Block a user