Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/build-clang-doxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,17 +154,19 @@ jobs:
echo EOF
} >> "$GITHUB_OUTPUT"
- name: fetch tinyuf2 combined.bin
env:
GH_TOKEN: ${{ github.token }}
run: |
BOARD_NAME="${{fromJson(steps.get_board_json.outputs.boardJson).bootloaderBoardName}}"
set +e
for attempt in 1 2 3; do
echo "Attempt $attempt: Fetching tinyuf2 release info for board $BOARD_NAME"
API_RESPONSE=$(curl --silent --fail https://api.github.com/repos/adafruit/tinyuf2/releases/latest)
API_RESPONSE=$(gh release view --repo adafruit/tinyuf2 --json assets)
if [ $? -ne 0 ]; then
echo "Attempt $attempt: curl failed to fetch release info."
if [ "$attempt" -eq 3 ]; then exit 1; else sleep $((60 + RANDOM % 40)); continue; fi
fi
DOWNLOAD_URL=$(echo "$API_RESPONSE" | jq -r '.assets[] | select(.browser_download_url | contains("tinyuf2-'$BOARD_NAME'-") and endswith(".zip")) | .browser_download_url // empty'); JQ_EXIT=$?
DOWNLOAD_URL=$(echo "$API_RESPONSE" | jq -r '.assets[] | select(.url | contains("tinyuf2-'$BOARD_NAME'-") and endswith(".zip")) | .url // empty'); JQ_EXIT=$?
if [ $JQ_EXIT -ne 0 ] || [ -z "$DOWNLOAD_URL" ]; then
echo "Attempt $attempt: jq failed or no matching zip found."
if [ "$attempt" -eq 3 ]; then exit 1; else sleep $((60 + RANDOM % 40)); continue; fi
Expand Down
Loading