Retry on deadsnake repo add failure (#13026)

This has been failing with a 504
This commit is contained in:
Zanie Blue
2025-04-21 16:59:06 -05:00
committed by GitHub
parent 1c3706c4ef
commit 05c40921cc
+7 -1
View File
@@ -906,7 +906,13 @@ jobs:
steps:
- name: "Install python3.9"
run: |
sudo add-apt-repository ppa:deadsnakes
for i in {1..5}; do
sudo add-apt-repository ppa:deadsnakes && break || { echo "Attempt $i failed, retrying in 10 seconds..."; sleep 10; }
if [ $i -eq 5 ]; then
echo "Failed to add repository after 5 attempts"
exit 1
fi
done
sudo apt-get update
sudo apt-get install python3.9