Skip to content

Commit 2a565b2

Browse files
committed
fix: 禁用CGO编译;修复action问题
1 parent 909cc22 commit 2a565b2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.github/workflows/build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
go-version: '^1.22.1'
4343

4444
- name: Build Binary
45-
run:
45+
run: |
4646
sudo apt install upx -y
4747
bash build.sh
4848

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ RUN go mod download
88

99
COPY . .
1010

11-
RUN CGO_ENABLED=1 GOOS=linux go build -o main .
11+
RUN CGO_ENABLED=0 GOOS=linux go build -o main .
1212

1313
CMD ["./main"]

0 commit comments

Comments
 (0)