Retry on Rocky Linux Python install (#16190)

I'm not sure why these mirrors have been flaky lately.

e.g.
5225634838
This commit is contained in:
Zanie Blue 2025-10-08 12:24:27 -05:00 committed by GitHub
parent 3c30e11a4d
commit a681fe9976
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2201,12 +2201,24 @@ jobs:
- name: "Install Python"
if: matrix.rocky-version == '8'
run: |
dnf install python39 python39-pip which -y
for i in {1..5}; do
dnf install python39 python39-pip which -y && break || { echo "Attempt $i failed, retrying in 10 seconds..."; sleep 10; }
if [ $i -eq 5 ]; then
echo "Failed to install Python after 5 attempts"
exit 1
fi
done
- name: "Install Python"
if: matrix.rocky-version == '9'
run: |
dnf install python3.9 python3.9-pip which -y
for i in {1..5}; do
dnf install python3.9 python3.9-pip which -y && break || { echo "Attempt $i failed, retrying in 10 seconds..."; sleep 10; }
if [ $i -eq 5 ]; then
echo "Failed to install Python after 5 attempts"
exit 1
fi
done
- name: "Install Python"
if: matrix.rocky-version == '10'