ci: use ustc debian mirror in release image
This commit is contained in:
@@ -13,7 +13,7 @@ env:
|
||||
GITEA_SERVER_URL: https://git.pchuan.top
|
||||
RUST_IMAGE: docker.m.daocloud.io/library/rust:1-bookworm
|
||||
CARGO_REGISTRY: sparse+https://rsproxy.cn/index/
|
||||
APT_MIRROR: https://mirrors.ustc.edu.cn/ubuntu
|
||||
APT_MIRROR: https://mirrors.ustc.edu.cn/debian
|
||||
CARGO_TERM_COLOR: always
|
||||
|
||||
jobs:
|
||||
|
||||
@@ -3,7 +3,7 @@ FROM --platform=$BUILDPLATFORM ${RUST_IMAGE} AS builder
|
||||
|
||||
ARG RUST_TARGET=x86_64-unknown-linux-gnu
|
||||
ARG CARGO_REGISTRY=sparse+https://rsproxy.cn/index/
|
||||
ARG APT_MIRROR=https://mirrors.ustc.edu.cn/ubuntu
|
||||
ARG APT_MIRROR=https://mirrors.ustc.edu.cn/debian
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
@@ -16,12 +16,24 @@ RUN find /etc/apt/sources.list.d -type f \( -name "*.list" -o -name "*.sources"
|
||||
-e "s|https://archive.ubuntu.com/ubuntu|${APT_MIRROR}|g" \
|
||||
-e "s|http://security.ubuntu.com/ubuntu|${APT_MIRROR}|g" \
|
||||
-e "s|https://security.ubuntu.com/ubuntu|${APT_MIRROR}|g" \
|
||||
-e "s|http://deb.debian.org/debian-security|${APT_MIRROR}-security|g" \
|
||||
-e "s|https://deb.debian.org/debian-security|${APT_MIRROR}-security|g" \
|
||||
-e "s|http://security.debian.org/debian-security|${APT_MIRROR}-security|g" \
|
||||
-e "s|https://security.debian.org/debian-security|${APT_MIRROR}-security|g" \
|
||||
-e "s|http://deb.debian.org/debian|${APT_MIRROR}|g" \
|
||||
-e "s|https://deb.debian.org/debian|${APT_MIRROR}|g" \
|
||||
&& if [ -f /etc/apt/sources.list ]; then \
|
||||
sed -i \
|
||||
-e "s|http://archive.ubuntu.com/ubuntu|${APT_MIRROR}|g" \
|
||||
-e "s|https://archive.ubuntu.com/ubuntu|${APT_MIRROR}|g" \
|
||||
-e "s|http://security.ubuntu.com/ubuntu|${APT_MIRROR}|g" \
|
||||
-e "s|https://security.ubuntu.com/ubuntu|${APT_MIRROR}|g" \
|
||||
-e "s|http://deb.debian.org/debian-security|${APT_MIRROR}-security|g" \
|
||||
-e "s|https://deb.debian.org/debian-security|${APT_MIRROR}-security|g" \
|
||||
-e "s|http://security.debian.org/debian-security|${APT_MIRROR}-security|g" \
|
||||
-e "s|https://security.debian.org/debian-security|${APT_MIRROR}-security|g" \
|
||||
-e "s|http://deb.debian.org/debian|${APT_MIRROR}|g" \
|
||||
-e "s|https://deb.debian.org/debian|${APT_MIRROR}|g" \
|
||||
/etc/apt/sources.list; \
|
||||
fi \
|
||||
&& apt-get update \
|
||||
|
||||
Reference in New Issue
Block a user