1028
All checks were successful
Clone Repository with Trojan-Go Proxy / clone_with_proxy (push) Successful in 32s
All checks were successful
Clone Repository with Trojan-Go Proxy / clone_with_proxy (push) Successful in 32s
This commit is contained in:
parent
a1b5d3fc8f
commit
b7def1390d
22
.github/workflows/BBB.yml
vendored
22
.github/workflows/BBB.yml
vendored
@ -54,17 +54,29 @@ jobs:
|
|||||||
http_proxy: "socks5://127.0.0.1:1080"
|
http_proxy: "socks5://127.0.0.1:1080"
|
||||||
https_proxy: "socks5://127.0.0.1:1080"
|
https_proxy: "socks5://127.0.0.1:1080"
|
||||||
run: |
|
run: |
|
||||||
echo "Checking ALL_PROXY: $ALL_PROXY"
|
echo "检查代理设置:$ALL_PROXY"
|
||||||
|
echo "开始尝试克隆仓库..."
|
||||||
|
|
||||||
# 尝试多次克隆仓库,直到成功
|
# 尝试多次克隆仓库,直到成功
|
||||||
n=0
|
n=1
|
||||||
until [ "$n" -ge 5 ]
|
max_retries=5
|
||||||
|
while [ "$n" -le "$max_retries" ]
|
||||||
do
|
do
|
||||||
git clone --depth 1 $REPO_URL -b $REPO_BRANCH && break
|
echo "正在尝试第 $n 次克隆仓库..."
|
||||||
|
git clone --depth 1 "$REPO_URL" -b "$REPO_BRANCH" && break
|
||||||
|
echo "第 $n 次克隆失败,将在5秒后重试..."
|
||||||
n=$((n+1))
|
n=$((n+1))
|
||||||
echo "Retrying clone in 5 seconds... ($n/5)"
|
|
||||||
sleep 5
|
sleep 5
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# 检查克隆是否成功
|
||||||
|
if [ "$n" -gt "$max_retries" ]; then
|
||||||
|
echo "克隆仓库失败,请检查网络或代理设置。"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "仓库克隆成功!"
|
||||||
|
fi
|
||||||
|
|
||||||
# 1. 不使用代理的步骤
|
# 1. 不使用代理的步骤
|
||||||
- name: 🌐 Step without Proxy
|
- name: 🌐 Step without Proxy
|
||||||
run: |
|
run: |
|
||||||
|
Loading…
x
Reference in New Issue
Block a user