From 8888382067be2c45255921c308d2033dcdd9236f Mon Sep 17 00:00:00 2001 From: shanshanzhong Date: Sun, 4 Jan 2026 01:00:16 -0800 Subject: [PATCH] =?UTF-8?q?ci(docker):=20=E7=A1=AE=E4=BF=9D=E6=9E=84?= =?UTF-8?q?=E5=BB=BA=E7=8E=AF=E5=A2=83=E4=B8=ADcurl=E5=8F=AF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 添加对curl的检查与安装逻辑,以支持后续nvm安装脚本的执行 --- .gitea/workflows/docker.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.gitea/workflows/docker.yml b/.gitea/workflows/docker.yml index eb5e135..3cbfc8f 100644 --- a/.gitea/workflows/docker.yml +++ b/.gitea/workflows/docker.yml @@ -40,6 +40,23 @@ jobs: - name: Build dist in Node container run: | set -e + # ensure curl available + if ! command -v curl >/dev/null 2>&1; then + if command -v apt-get >/dev/null 2>&1; then + apt-get update -y + apt-get install -y curl ca-certificates + elif command -v yum >/dev/null 2>&1; then + yum install -y curl ca-certificates + elif command -v dnf >/dev/null 2>&1; then + dnf install -y curl ca-certificates + elif command -v apk >/dev/null 2>&1; then + apk add --no-cache curl ca-certificates + elif command -v zypper >/dev/null 2>&1; then + zypper install -y curl ca-certificates + else + echo "No known package manager found to install curl"; exit 1 + fi + fi export NVM_DIR="$HOME/.nvm" if [ ! -d "$NVM_DIR" ]; then curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash