mirror of
https://github.com/BetterCorp/BetterFrame.git
synced 2026-05-26 21:26:33 +00:00
fix(ci): retry firmware auto-import on TLS/transient failure
This commit is contained in:
parent
0aaa1d931a
commit
ee980509c7
1 changed files with 11 additions and 5 deletions
16
.github/workflows/build.yml
vendored
16
.github/workflows/build.yml
vendored
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue