更改rustup脚本地址

This commit is contained in:
chenwj113 2024-08-21 16:07:22 +08:00
parent c0bc579c13
commit 3c51f90286
1 changed files with 7 additions and 1 deletions

View File

@ -106,6 +106,12 @@ runs:
if [[ ! -v CARGO_REGISTRIES_CRATES_IO_PROTOCOL ]]; then if [[ ! -v CARGO_REGISTRIES_CRATES_IO_PROTOCOL ]]; then
echo "CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse" >> $GITHUB_ENV echo "CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse" >> $GITHUB_ENV
fi fi
if [[ ! -v RUSTUP_DIST_SERVER ]]; then
echo "RUSTUP_DIST_SERVER=\"https://rsproxy.cn\"" >> $GITHUB_ENV
fi
if [[ ! -v RUSTUP_UPDATE_ROOT ]]; then
echo "RUSTUP_UPDATE_ROOT=\"https://rsproxy.cn/rustup\"" >> $GITHUB_ENV
fi
- name: Install Rust Problem Matcher - name: Install Rust Problem Matcher
if: inputs.matcher == 'true' if: inputs.matcher == 'true'
@ -117,7 +123,7 @@ runs:
shell: bash shell: bash
run: | run: |
if ! command -v rustup &> /dev/null ; then if ! command -v rustup &> /dev/null ; then
curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused -fsSL "https://sh.rustup.rs" | sh -s -- --default-toolchain none -y curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused -fsSL "https://rsproxy.cn/rustup-init.sh" | sh -s -- --default-toolchain none -y
echo "${CARGO_HOME:-$HOME/.cargo}/bin" >> $GITHUB_PATH echo "${CARGO_HOME:-$HOME/.cargo}/bin" >> $GITHUB_PATH
fi fi