fix(ci): retry firmware auto-import on TLS/transient failure

This commit is contained in:
Mitchell R 2026-05-23 00:05:21 +02:00
parent 0aaa1d931a
commit ee980509c7
No known key found for this signature in database

View file

@ -121,11 +121,17 @@ jobs:
--rawfile b "${bin}.b64" \ --rawfile b "${bin}.b64" \
'{version:$v, channel:$c, arch:$a, release_notes:$n, content_b64:$b}' \ '{version:$v, channel:$c, arch:$a, release_notes:$n, content_b64:$b}' \
> "${bin}.import.json" > "${bin}.import.json"
curl -sSf -X POST \ for attempt in 1 2 3; do
-H "Authorization: Bearer ${BF_AUTOIMPORT_API_KEY}" \ if curl -sSf --retry 2 --retry-delay 5 -X POST \
-H "Content-Type: application/json" \ -H "Authorization: Bearer ${BF_AUTOIMPORT_API_KEY}" \
--data-binary @"${bin}.import.json" \ -H "Content-Type: application/json" \
"${BF_AUTOIMPORT_URL}/api/admin/firmware/import" --data-binary @"${bin}.import.json" \
"${BF_AUTOIMPORT_URL}/api/admin/firmware/import"; then
break
fi
echo "Import attempt $attempt failed, retrying in 10s..."
sleep 10
done
- name: Upload artifact (always) - name: Upload artifact (always)
uses: actions/upload-artifact@v7 uses: actions/upload-artifact@v7