From d73bbf53cf8cc6a052ea16af8ff83eaaba778497 Mon Sep 17 00:00:00 2001 From: gouki Date: Sun, 9 Aug 2026 18:06:06 +0000 Subject: [PATCH] =?UTF-8?q?fix(ci):=20=E7=B2=BE=E7=AE=80=20runner=20?= =?UTF-8?q?=E7=8E=AF=E5=A2=83=E8=87=AA=E9=80=82=E5=BA=94=E5=AE=89=E8=A3=85?= =?UTF-8?q?=20curl=EF=BC=88=E5=8F=91=E5=B8=83=20release=20=E4=BE=9D?= =?UTF-8?q?=E8=B5=96=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/server-deploy.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.gitea/workflows/server-deploy.yml b/.gitea/workflows/server-deploy.yml index c8dba7c..5aedafa 100644 --- a/.gitea/workflows/server-deploy.yml +++ b/.gitea/workflows/server-deploy.yml @@ -25,6 +25,17 @@ jobs: git checkout -q FETCH_HEAD git log --oneline -3 + - name: Ensure curl available + run: | + # 精简 runner(Alpine 等)可能未预装 curl,发布 release 需要它 + if ! command -v curl >/dev/null 2>&1; then + if command -v apk >/dev/null 2>&1; then apk add --no-cache curl + elif command -v apt-get >/dev/null 2>&1; then apt-get update -qq && apt-get install -y -qq curl + elif command -v dnf >/dev/null 2>&1; then dnf install -y -q curl + else echo "无法安装 curl"; exit 1; fi + fi + curl --version | head -1 + - name: Prepare Go toolchain run: | # 优先复用 runner 宿主机缓存的工具链(工作目录持久化)