chore(build): 设置默认 GOPROXY 为阿里云镜像
Some checks failed
release-nightly / goreleaser (push) Waiting to run
release-nightly / release-image (map[tag_suffix:-dind target:dind]) (push) Waiting to run
release-nightly / release-image (map[tag_suffix: target:basic]) (push) Failing after 1m32s
release-nightly / release-image (map[tag_suffix:-dind-rootless target:dind-rootless]) (push) Failing after 3m12s
checks / check and test (push) Failing after 31s
Some checks failed
release-nightly / goreleaser (push) Waiting to run
release-nightly / release-image (map[tag_suffix:-dind target:dind]) (push) Waiting to run
release-nightly / release-image (map[tag_suffix: target:basic]) (push) Failing after 1m32s
release-nightly / release-image (map[tag_suffix:-dind-rootless target:dind-rootless]) (push) Failing after 3m12s
checks / check and test (push) Failing after 31s
- 在 Dockerfile 中设置 GOPROXY 默认值为 https://mirrors.aliyun.com/goproxy/,direct - 在 Makefile 中添加 GOPROXY 变量并导出 - 配置 Go 模块代理以提高依赖下载速度
This commit is contained in:
@@ -7,7 +7,7 @@ FROM golang:1.24-alpine AS builder
|
|||||||
RUN apk add --no-cache make git
|
RUN apk add --no-cache make git
|
||||||
|
|
||||||
ARG GOPROXY
|
ARG GOPROXY
|
||||||
ENV GOPROXY=${GOPROXY:-}
|
ENV GOPROXY=${GOPROXY:-https://mirrors.aliyun.com/goproxy/,direct}
|
||||||
|
|
||||||
COPY . /opt/src/act_runner
|
COPY . /opt/src/act_runner
|
||||||
WORKDIR /opt/src/act_runner
|
WORKDIR /opt/src/act_runner
|
||||||
|
|||||||
2
Makefile
2
Makefile
@@ -21,6 +21,8 @@ DOCKER_REF := $(DOCKER_IMAGE):$(DOCKER_TAG)
|
|||||||
DOCKER_ROOTLESS_REF := $(DOCKER_IMAGE):$(DOCKER_TAG)-dind-rootless
|
DOCKER_ROOTLESS_REF := $(DOCKER_IMAGE):$(DOCKER_TAG)-dind-rootless
|
||||||
|
|
||||||
GOVULNCHECK_PACKAGE ?= golang.org/x/vuln/cmd/govulncheck@v1
|
GOVULNCHECK_PACKAGE ?= golang.org/x/vuln/cmd/govulncheck@v1
|
||||||
|
GOPROXY ?= https://mirrors.aliyun.com/goproxy/,direct
|
||||||
|
export GOPROXY
|
||||||
|
|
||||||
ifneq ($(shell uname), Darwin)
|
ifneq ($(shell uname), Darwin)
|
||||||
EXTLDFLAGS = -extldflags "-static" $(null)
|
EXTLDFLAGS = -extldflags "-static" $(null)
|
||||||
|
|||||||
Reference in New Issue
Block a user