ci: route remaining package downloads to mirrors

This commit is contained in:
2026-08-13 23:37:21 +08:00
parent 96ed3396d9
commit d38c9490ba
3 changed files with 13 additions and 1 deletions
+3
View File
@@ -0,0 +1,3 @@
registry=https://registry.npmmirror.com/
audit=false
fund=false
+1 -1
View File
@@ -19,7 +19,7 @@ ENV HTTP_PROXY=${HTTP_PROXY} \
https_proxy=${https_proxy} \
no_proxy=${no_proxy}
COPY package*.json ./
COPY package*.json .npmrc ./
RUN npm ci
COPY . .
+9
View File
@@ -61,6 +61,15 @@ ensure_arm64_emulation() {
wsl.exe -d "$WSL_DISTRO" -u root -- bash -lc '
set -e
if [ ! -x /usr/bin/qemu-aarch64-static ]; then
for source_file in /etc/apt/sources.list /etc/apt/sources.list.d/*.sources; do
[ -f "$source_file" ] || continue
sed -i \
-e "s|deb.debian.org|mirrors.tuna.tsinghua.edu.cn|g" \
-e "s|security.debian.org/debian-security|mirrors.tuna.tsinghua.edu.cn/debian-security|g" \
-e "s|archive.ubuntu.com|mirrors.tuna.tsinghua.edu.cn|g" \
-e "s|security.ubuntu.com|mirrors.tuna.tsinghua.edu.cn|g" \
"$source_file"
done
apt-get update -qq
apt-get install -y -qq qemu-user-static
fi