fix: update Go build command to set CGO_ENABLED for static linking

This commit is contained in:
2026-01-10 20:12:33 +08:00
parent 1658469d0a
commit 28a3f4df89

View File

@@ -38,7 +38,7 @@ jobs:
- name: Go build
run: |
cd ${{ gitea.workspace }}
set CGO_ENABLED=0 # 关闭 CGO 以确保生成的二进制文件是静态链接的
CGO_ENABLED=0 # 关闭 CGO 以确保生成的二进制文件是静态链接的
go build -ldflags "-X main.version=1.0.0-${{ gitea.sha }}" -o helloapp .
- name: Check Docker
run: |