From 220a1f91b0b5977313f33d243a9b85e743536318 Mon Sep 17 00:00:00 2001 From: xfy Date: Fri, 12 Jun 2026 17:44:19 +0800 Subject: [PATCH] ci: retry rustup install on network failure --- .gitea/workflows/ci.yaml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index 7ee9e31..27ffaa2 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -28,7 +28,11 @@ jobs: - name: Install Rust toolchain run: | - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable + for i in 1 2 3; do + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable && break + echo "rustup install attempt $i failed, retrying..." + sleep 15 + done echo "$HOME/.cargo/bin" >> $GITHUB_PATH - name: Install Node.js @@ -78,7 +82,11 @@ jobs: - name: Install Rust toolchain run: | - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable + for i in 1 2 3; do + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable && break + echo "rustup install attempt $i failed, retrying..." + sleep 15 + done echo "$HOME/.cargo/bin" >> $GITHUB_PATH - name: Install Node.js