Skip to content

Commit

Permalink
Fix: fetching of repo_topics now fails gracefully
Browse files Browse the repository at this point in the history
  • Loading branch information
tyeth committed Feb 26, 2024
1 parent 688794f commit 009b293
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion actions_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ arduino-cli core update-index > /dev/null
case "$GITHUB_REPOSITORY" in
(*/ci-arduino|*/Adafruit_Learning_System_Guides) ;;
(*)
repo_topics=$($(curl --request GET --url "https://api.github.com/repos/$GITHUB_REPOSITORY" || []) | jq -r '.topics[]')
repo_topics=$(curl -f --request GET --url "https://api.github.com/repos/$GITHUB_REPOSITORY" || echo '{"topics":[]}')
repo_topics=$(echo $repo_topics | jq -r '.topics[]' )
if [[ ! $repo_topics =~ "arduino-library" ]]; then
echo "::warning::arduino-library is not found in this repo topics. Please add this tag in repo About"
fi
Expand Down

0 comments on commit 009b293

Please sign in to comment.