fix: export CGO_ENABLED in Go build step for proper static linking

This commit is contained in:
2026-01-10 20:18:38 +08:00
parent e28aa42207
commit 9865f7fa7a

View File

@@ -38,7 +38,7 @@ jobs:
- name: Go build - name: Go build
run: | run: |
cd ${{ gitea.workspace }} cd ${{ gitea.workspace }}
CGO_ENABLED=0 export CGO_ENABLED=0
go build -ldflags "-X main.version=1.0.0-${{ gitea.sha }}" -o helloapp . go build -ldflags "-X main.version=1.0.0-${{ gitea.sha }}" -o helloapp .
- name: Check Docker - name: Check Docker
run: | run: |