Fix: fetching of repo_topics now fails gracefully
This commit is contained in:
parent
eb3e1d3ee7
commit
ece43c9e34
1 changed files with 2 additions and 1 deletions
|
|
@ -37,7 +37,8 @@ arduino-cli core update-index > /dev/null
|
||||||
case "$GITHUB_REPOSITORY" in
|
case "$GITHUB_REPOSITORY" in
|
||||||
(*/ci-arduino|*/Adafruit_Learning_System_Guides) ;;
|
(*/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
|
if [[ ! $repo_topics =~ "arduino-library" ]]; then
|
||||||
echo "::warning::arduino-library is not found in this repo topics. Please add this tag in repo About"
|
echo "::warning::arduino-library is not found in this repo topics. Please add this tag in repo About"
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue