From b93ab66e54aa8a2c9f0fa317197869155e543352 Mon Sep 17 00:00:00 2001 From: dcsunny <934831065@qq.com> Date: Fri, 30 Jan 2026 11:04:25 +0800 Subject: [PATCH] =?UTF-8?q?chore(build):=20=E8=AE=BE=E7=BD=AE=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=20GOPROXY=20=E4=B8=BA=E9=98=BF=E9=87=8C=E4=BA=91?= =?UTF-8?q?=E9=95=9C=E5=83=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在 Dockerfile 中设置 GOPROXY 默认值为 https://mirrors.aliyun.com/goproxy/,direct - 在 Makefile 中添加 GOPROXY 变量并导出 - 配置 Go 模块代理以提高依赖下载速度 --- Dockerfile | 2 +- Makefile | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 40e2d66..74c5980 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,7 @@ FROM golang:1.24-alpine AS builder RUN apk add --no-cache make git ARG GOPROXY -ENV GOPROXY=${GOPROXY:-} +ENV GOPROXY=${GOPROXY:-https://mirrors.aliyun.com/goproxy/,direct} COPY . /opt/src/act_runner WORKDIR /opt/src/act_runner diff --git a/Makefile b/Makefile index 448fb10..0bc43b4 100644 --- a/Makefile +++ b/Makefile @@ -21,6 +21,8 @@ DOCKER_REF := $(DOCKER_IMAGE):$(DOCKER_TAG) DOCKER_ROOTLESS_REF := $(DOCKER_IMAGE):$(DOCKER_TAG)-dind-rootless GOVULNCHECK_PACKAGE ?= golang.org/x/vuln/cmd/govulncheck@v1 +GOPROXY ?= https://mirrors.aliyun.com/goproxy/,direct +export GOPROXY ifneq ($(shell uname), Darwin) EXTLDFLAGS = -extldflags "-static" $(null)