fix(ci): 精简 runner 环境自适应安装 curl(发布 release 依赖)
Build and Publish Server / build (push) Failing after 2m55s
Build and Publish Server / build (push) Failing after 2m55s
This commit is contained in:
@@ -25,6 +25,17 @@ jobs:
|
|||||||
git checkout -q FETCH_HEAD
|
git checkout -q FETCH_HEAD
|
||||||
git log --oneline -3
|
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
|
- name: Prepare Go toolchain
|
||||||
run: |
|
run: |
|
||||||
# 优先复用 runner 宿主机缓存的工具链(工作目录持久化)
|
# 优先复用 runner 宿主机缓存的工具链(工作目录持久化)
|
||||||
|
|||||||
Reference in New Issue
Block a user