forked from Eeveid/lightOps
🐛 fix(workflow): 为 Cargo 配置 crates 镜像源
- 在安装 Rust 步骤写入 ~/.cargo/config.toml,将 crates-io 切换到 rsproxy sparse registry - 避免 runner 访问 index.crates.io 超时导致依赖下载失败 - 与 rustup 镜像配置配合,统一走国内镜像完成工具链和依赖安装
This commit is contained in:
@@ -80,6 +80,14 @@ jobs:
|
|||||||
echo "使用 Rust 构建目标: $BUILD_TARGET"
|
echo "使用 Rust 构建目标: $BUILD_TARGET"
|
||||||
rustc -V
|
rustc -V
|
||||||
cargo -V
|
cargo -V
|
||||||
|
mkdir -p "$HOME/.cargo"
|
||||||
|
cat >"$HOME/.cargo/config.toml" <<'EOF'
|
||||||
|
[source.crates-io]
|
||||||
|
replace-with = "rsproxy-sparse"
|
||||||
|
|
||||||
|
[source.rsproxy-sparse]
|
||||||
|
registry = "sparse+https://rsproxy.cn/index/"
|
||||||
|
EOF
|
||||||
|
|
||||||
- name: 构建发布包
|
- name: 构建发布包
|
||||||
env:
|
env:
|
||||||
|
|||||||
Reference in New Issue
Block a user