From 05c40921cc0068cce2f2548452f7698023e1af69 Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Mon, 21 Apr 2025 16:59:06 -0500 Subject: [PATCH] Retry on deadsnake repo add failure (#13026) This has been failing with a 504 --- .github/workflows/ci.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0680936fa..7ae9b41bc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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