Skip to content

Commit 16c18e5

Browse files
committed
ci: use resilient proxy in source fallback
1 parent ea5ea93 commit 16c18e5

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

.github/workflows/merge-trigger-tke.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,9 @@ jobs:
176176
if: ${{ steps.cached.outcome != 'success' }}
177177
run: |
178178
cd "$GITHUB_WORKSPACE/matrixone"
179+
# The fallback must quote GOPROXY because the resilient `|` proxy
180+
# chain is interpreted as a shell pipeline by an old Dockerfile.
181+
sed -i 's#RUN go env -w GOPROXY=${GOPROXY}#RUN go env -w GOPROXY="${GOPROXY}"#' optools/images/Dockerfile
179182
sed -i 's#^RUN apt-get update#RUN sed -i "s?http.*ubuntu\.com?http://mirrors\.tuna\.tsinghua\.edu\.cn?g" /etc/apt/sources.list \&\& apt-get clean all \&\& apt-get update#g' optools/images/Dockerfile
180183
sed -i 's#FROM golang:1.21.5-bookworm#FROM ccr.ccs.tencentyun.com/cicd-runner/golang:1.21.5-bookworm#g' optools/images/Dockerfile
181184
sed -i 's#FROM ubuntu:22.04#FROM ccr.ccs.tencentyun.com/mo-infra/ubuntu:22.04#g' optools/images/Dockerfile
@@ -197,7 +200,7 @@ jobs:
197200
cache-to: type=registry,ref=${{ steps.prep.outputs.docker_image }}:cache-${{ github.base_ref }},mode=max
198201
platform: linux/amd64
199202
build-args: |
200-
GOPROXY=http://goproxy.goproxy.svc.cluster.local
203+
GOPROXY=http://goproxy.goproxy.svc.cluster.local|https://goproxy.cn|direct
201204
setup_mo_test_env:
202205
if: ${{ always() && !cancelled() && needs.docker_image_build.result == 'success' }}
203206
needs: docker_image_build

0 commit comments

Comments
 (0)