|
31 | 31 | jobs:
|
32 | 32 | docker_image_build:
|
33 | 33 | environment: ci
|
34 |
| - runs-on: ubuntu-latest #amd64-mo-shanghai-dind #amd64-mo-guangzhou-dind |
| 34 | + runs-on: amd64-mo-shanghai-dind #amd64-mo-guangzhou-dind |
35 | 35 | if: ${{ github.event.pull_request.merged == true }}
|
36 | 36 | timeout-minutes: 30
|
37 | 37 | name: BUILD MO DOCKER IMAGE
|
@@ -62,19 +62,19 @@ jobs:
|
62 | 62 | echo ${TAGS}
|
63 | 63 | echo ${{ secrets.TCR_TOKEN }} | docker login ccr.ccs.tencentyun.com -u ${{ secrets.TCR_USERNAME }} --password-stdin
|
64 | 64 |
|
65 |
| - # # # add tencentyun docker image mirror and tencentyun apt mirror |
66 |
| - # sed -i 's#^RUN apt-get update#RUN sed -i "s?http.*ubuntu\.com?http://mirrors\.ustc\.edu\.cn?g" /etc/apt/sources.list \&\& apt-get clean all \&\& apt-get update#g' optools/images/Dockerfile |
67 |
| - # 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 |
68 |
| - # sed -i 's#FROM ubuntu:22.04#FROM ccr.ccs.tencentyun.com/mo-infra/ubuntu:22.04#g' optools/images/Dockerfile |
| 65 | + # # add tencentyun docker image mirror and tencentyun apt mirror |
| 66 | + sed -i '8s#RUN apt-get update#RUN sed -i "s/deb\.debian\.org/mirrors\.ustc\.edu\.cn/g" /etc/apt/sources.list.d/debian.sources; apt-get update#g' optools/images/Dockerfile |
| 67 | + sed -i '38s#^RUN apt-get update#RUN sed -i "s?http.*ubuntu\.com?http://mirrors\.ustc\.edu\.cn?g" /etc/apt/sources.list \&\& apt-get clean all \&\& apt-get update#g' optools/images/Dockerfile |
| 68 | + 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 |
| 69 | + sed -i 's#FROM ubuntu:22.04#FROM ccr.ccs.tencentyun.com/mo-infra/ubuntu:22.04#g' optools/images/Dockerfile |
69 | 70 |
|
70 |
| - # # adjust for go 1.22.3 |
71 |
| - # sed -i 's#FROM golang:1.22.3-bookworm#FROM ccr.ccs.tencentyun.com/mo-infra/golang:1.22.3-bookworm#g' optools/images/Dockerfile |
| 71 | + # adjust for go 1.22.3 |
| 72 | + sed -i 's#FROM golang:1.22.3-bookworm#FROM ccr.ccs.tencentyun.com/mo-infra/golang:1.22.3-bookworm#g' optools/images/Dockerfile |
72 | 73 |
|
73 |
| - # # adjust for go 1.23.0 |
74 |
| - # sed -i 's#FROM golang:1.23.0-bookworm#FROM ccr.ccs.tencentyun.com/mo-infra/golang:1.23.0-bookworm#g' optools/images/Dockerfile |
| 74 | + # adjust for go 1.23.0 |
| 75 | + sed -i 's#FROM golang:1.23.0-bookworm#FROM ccr.ccs.tencentyun.com/mo-infra/golang:1.23.0-bookworm#g' optools/images/Dockerfile |
75 | 76 |
|
76 |
| - # --build-arg GOPROXY='http://goproxy.goproxy.svc.cluster.local' |
77 |
| - docker build -t $TAGS -f optools/images/Dockerfile . |
| 77 | + docker build -t $TAGS -f optools/images/Dockerfile . --build-arg GOPROXY='http://goproxy.goproxy.svc.cluster.local' |
78 | 78 | docker push $TAGS
|
79 | 79 | setup_mo_test_env:
|
80 | 80 | if: ${{ always() && !cancelled() && needs.docker_image_build.result == 'success' }}
|
|
0 commit comments