在所有 Go 命令中设置 GOTOOLCHAIN=auto
Some checks failed
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Failing after 4s
Some checks failed
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Failing after 4s
This commit is contained in:
@@ -22,13 +22,13 @@ RUN go mod download
|
||||
COPY . .
|
||||
|
||||
# 编译 API 服务(静态链接)
|
||||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build \
|
||||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GOTOOLCHAIN=auto go build \
|
||||
-ldflags="-w -s" \
|
||||
-o /build/api \
|
||||
cmd/api/main.go
|
||||
|
||||
# 下载 golang-migrate 工具
|
||||
RUN go install -tags 'postgres' github.com/golang-migrate/migrate/v4/cmd/migrate@latest
|
||||
RUN GOTOOLCHAIN=auto go install -tags 'postgres' github.com/golang-migrate/migrate/v4/cmd/migrate@latest
|
||||
|
||||
# ================================
|
||||
# 阶段 2: 运行阶段
|
||||
|
||||
Reference in New Issue
Block a user