File tree Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 1616
1717jobs :
1818 docker-build-push :
19- runs-on : ubuntu-24.04
19+ runs-on : linux-amd64-cpu4
2020 steps :
2121 - uses : actions/checkout@v4
2222 - name : Determine docker tags
3333 - name : Make build and push
3434 env :
3535 TAG : mellanox/${{ env.IMAGE_NAME }}
36+ GOPROXY : ${{ secrets.GOPROXY }}
3637 run : |
3738 echo "Docker tags will be: $DOCKER_TAGS"
3839 for docker_tag in $DOCKER_TAGS; do
Original file line number Diff line number Diff line change @@ -35,6 +35,9 @@ COPY ./ ./
3535ARG ARCH
3636ARG LDFLAGS
3737ARG GCFLAGS
38+ ARG GOPROXY=direct
39+ ENV GOPROXY=$GOPROXY
40+
3841RUN --mount=type=cache,target=/go/pkg/mod \
3942 --mount=type=cache,target=/root/.cache/go-build \
4043 CGO_ENABLED=0 GOOS=linux GOARCH=${ARCH} go build -ldflags="${LDFLAGS}" -gcflags="${GCFLAGS}" -o manager main.go && \
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ TESTPKGS=./...
2727ENVTEST_K8S_VERSION =1.28
2828ARCH ?= $(shell go env GOARCH)
2929OS ?= $(shell go env GOOS)
30+ GOPROXY ?= direct
3031
3132# Version
3233VERSION? =master
@@ -299,6 +300,7 @@ image: ; $(info Building Docker image...) @ ## Build container image
299300 --build-arg LDFLAGS=$(LDFLAGS ) \
300301 --build-arg ARCH=" $( ARCH) " \
301302 --build-arg GCFLAGS=" $( GCFLAGS) " \
303+ --build-arg GOPROXY=" $( GOPROXY) " \
302304 -t $(TAG ) -f $(DOCKERFILE ) $(CURDIR ) $(IMAGE_BUILD_OPTS )
303305
304306image-push :
@@ -318,6 +320,7 @@ image-build: ; $(info Building Docker image...) @ ## Build container image
318320 --build-arg LDFLAGS=$(LDFLAGS ) \
319321 --build-arg ARCH=" $( ARCH) " \
320322 --build-arg GCFLAGS=" $( GCFLAGS) " \
323+ --build-arg GOPROXY=" $( GOPROXY) " \
321324 -t $(CONTROLLER_IMAGE ) :$(VERSION ) -$(ARCH ) -f $(DOCKERFILE ) $(CURDIR ) $(IMAGE_BUILD_OPTS )
322325
323326image-build-% :
You can’t perform that action at this time.
0 commit comments