ci(hf-mirror): retry push on transient HF 429
Browse files
.github/workflows/hf-mirror.yml
CHANGED
|
@@ -13,8 +13,14 @@ jobs:
|
|
| 13 |
uses: actions/checkout@v4
|
| 14 |
with:
|
| 15 |
fetch-depth: 0
|
| 16 |
-
- name: Push to Hugging Face Hub
|
| 17 |
env:
|
| 18 |
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
| 19 |
run: |
|
| 20 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
uses: actions/checkout@v4
|
| 14 |
with:
|
| 15 |
fetch-depth: 0
|
| 16 |
+
- name: Push to Hugging Face Hub (retry on transient 429)
|
| 17 |
env:
|
| 18 |
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
| 19 |
run: |
|
| 20 |
+
for i in 1 2 3 4 5; do
|
| 21 |
+
if git push --force "https://sibyllabs:${HF_TOKEN}@huggingface.co/SibylLabsLLC/Sibyl-Memory" HEAD:main; then
|
| 22 |
+
echo "mirror pushed on attempt $i"; exit 0
|
| 23 |
+
fi
|
| 24 |
+
echo "attempt $i failed (likely transient HF 429); backing off"; sleep $((i*15))
|
| 25 |
+
done
|
| 26 |
+
echo "all push attempts failed"; exit 1
|