File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -2201,12 +2201,24 @@ jobs:
2201
2201
- name : " Install Python"
2202
2202
if : matrix.rocky-version == '8'
2203
2203
run : |
2204
- dnf install python39 python39-pip which -y
2204
+ for i in {1..5}; do
2205
+ dnf install python39 python39-pip which -y && break || { echo "Attempt $i failed, retrying in 10 seconds..."; sleep 10; }
2206
+ if [ $i -eq 5 ]; then
2207
+ echo "Failed to install Python after 5 attempts"
2208
+ exit 1
2209
+ fi
2210
+ done
2205
2211
2206
2212
- name : " Install Python"
2207
2213
if : matrix.rocky-version == '9'
2208
2214
run : |
2209
- dnf install python3.9 python3.9-pip which -y
2215
+ for i in {1..5}; do
2216
+ dnf install python3.9 python3.9-pip which -y && break || { echo "Attempt $i failed, retrying in 10 seconds..."; sleep 10; }
2217
+ if [ $i -eq 5 ]; then
2218
+ echo "Failed to install Python after 5 attempts"
2219
+ exit 1
2220
+ fi
2221
+ done
2210
2222
2211
2223
- name : " Install Python"
2212
2224
if : matrix.rocky-version == '10'
You can’t perform that action at this time.
0 commit comments