File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed
Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change 4040 echo "deb [trusted=yes] https://ci.deepin.com/repo/obs/deepin:/CI:/topics:/${trimedBranch}/deepin_develop/ ./" >> /etc/apt/sources.list
4141 echo "deb-src [trusted=yes] https://ci.deepin.com/repo/obs/deepin:/CI:/topics:/${trimedBranch}/deepin_develop/ ./" >> /etc/apt/sources.list
4242 fi
43- apt-get update && apt-get install -y --force-yes ca-certificates apt-transport-https sudo
44- sudo apt-get install -y --force-yes python3-pip python3-coverxygen
43+ retries=3
44+ for i in $(seq 1 $retries); do
45+ apt-get update && apt-get install -y --force-yes ca-certificates apt-transport-https sudo && sudo apt-get install -y --force-yes python3-pip python3-coverxygen
46+ status=$?
47+ if [ $status -eq 0 ]; then
48+ echo "Init succeeded after $i attempt(s)"
49+ exit 0
50+ fi
51+ if [ $i -lt $retries ]; then
52+ echo "Init failed. Attempt $i of $retries. Retrying in 5 seconds..."
53+ sleep 5
54+ fi
55+ done
56+ echo "Init failed after $retries attempts. Giving up."
57+ exit 1
4558
4659 - uses : actions/checkout@v3
4760 with :
You can’t perform that action at this time.
0 commit comments