File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -154,17 +154,19 @@ jobs:
154154 echo EOF
155155 } >> "$GITHUB_OUTPUT"
156156 - name : fetch tinyuf2 combined.bin
157+ env :
158+ GH_TOKEN : ${{ github.token }}
157159 run : |
158160 BOARD_NAME="${{fromJson(steps.get_board_json.outputs.boardJson).bootloaderBoardName}}"
159161 set +e
160162 for attempt in 1 2 3; do
161163 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 )
164+ API_RESPONSE=$(gh release view --repo adafruit/tinyuf2 --json assets )
163165 if [ $? -ne 0 ]; then
164166 echo "Attempt $attempt: curl failed to fetch release info."
165167 if [ "$attempt" -eq 3 ]; then exit 1; else sleep $((60 + RANDOM % 40)); continue; fi
166168 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=$?
169+ DOWNLOAD_URL=$(echo "$API_RESPONSE" | jq -r '.assets[] | select(.url | contains("tinyuf2-'$BOARD_NAME'-") and endswith(".zip")) | .url // empty'); JQ_EXIT=$?
168170 if [ $JQ_EXIT -ne 0 ] || [ -z "$DOWNLOAD_URL" ]; then
169171 echo "Attempt $attempt: jq failed or no matching zip found."
170172 if [ "$attempt" -eq 3 ]; then exit 1; else sleep $((60 + RANDOM % 40)); continue; fi
You can’t perform that action at this time.
0 commit comments