Skip to content

Commit 0949610

Browse files
authored
fix(ci): Replace curl with gh command to fetch release info
1 parent 9c44317 commit 0949610

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/build-clang-doxy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,12 +159,12 @@ jobs:
159159
set +e
160160
for attempt in 1 2 3; do
161161
echo "Attempt $attempt: Fetching tinyuf2 release info for board $BOARD_NAME"
162-
API_RESPONSE=$(curl --silent --fail https://api.github.com/repos/adafruit/tinyuf2/releases/latest)
162+
API_RESPONSE=$(gh release view --repo adafruit/tinyuf2 --json assets)
163163
if [ $? -ne 0 ]; then
164164
echo "Attempt $attempt: curl failed to fetch release info."
165165
if [ "$attempt" -eq 3 ]; then exit 1; else sleep $((60 + RANDOM % 40)); continue; fi
166166
fi
167-
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=$?
167+
DOWNLOAD_URL=$(echo "$API_RESPONSE" | jq -r '.assets[] | select(.url | contains("tinyuf2-'$BOARD_NAME'-") and endswith(".zip")) | .url // empty'); JQ_EXIT=$?
168168
if [ $JQ_EXIT -ne 0 ] || [ -z "$DOWNLOAD_URL" ]; then
169169
echo "Attempt $attempt: jq failed or no matching zip found."
170170
if [ "$attempt" -eq 3 ]; then exit 1; else sleep $((60 + RANDOM % 40)); continue; fi

0 commit comments

Comments
 (0)