Skip to content

Commit df5010d

Browse files
committed
Make apt update more robust adding sleeps betwen retries
1 parent c8e61a1 commit df5010d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,9 @@ jobs:
441441
echo "GHA_CONTAINER=${{matrix.container}}" >> $GITHUB_ENV
442442
if [ -f "/etc/debian_version" ]
443443
then
444-
apt-get -o Acquire::Retries=$NET_RETRY_COUNT update
444+
for i in $(seq 1 $NET_RETRY_COUNT); do
445+
apt-get update && break || sleep 5
446+
done
445447
if [ "$(apt-cache search "^python-is-python3$" | wc -l)" -ne 0 ]
446448
then
447449
PYTHON_PACKAGE="python-is-python3"
@@ -507,7 +509,9 @@ jobs:
507509
done
508510
done
509511
fi
510-
sudo apt-get -o Acquire::Retries=$NET_RETRY_COUNT update
512+
for i in $(seq 1 $NET_RETRY_COUNT); do
513+
apt-get update && break || sleep 5
514+
done
511515
sudo apt-get -o Acquire::Retries=$NET_RETRY_COUNT install -y ${{join(matrix.install, ' ')}}
512516
513517
- name: Setup GCC Toolchain

0 commit comments

Comments
 (0)