Skip to content

Commit

Permalink
Merge pull request #145 from adafruit/warn-if-no-arduino-library
Browse files Browse the repository at this point in the history
throw warnings if action_install.sh is used and repo does not have 'arduino-library' tag in its topic
  • Loading branch information
hathach authored Oct 28, 2022
2 parents 60471ff + 2656527 commit fd194d6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/githubci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- uses: actions/setup-python@v1
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: pre-install
Expand Down
9 changes: 9 additions & 0 deletions actions_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,12 @@ echo $GITHUB_WORKSPACE/bin >> $GITHUB_PATH
curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | sh
arduino-cli config init > /dev/null
arduino-cli core update-index > /dev/null

# warn if this library does not have arduino-library tag in its topic
if [ $GITHUB_REPOSITORY != "adafruit/ci-arduino" ]; then
repo_topics=$(curl --request GET --url "https://api.github.com/repos/$GITHUB_REPOSITORY" | jq -r '.topics[]' | xargs)
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
fi

0 comments on commit fd194d6

Please sign in to comment.