Merge pull request #112 from adafruit/samd-1.7.15-nrf-1.6.1 #66
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Trigger Libraries | |
on: | |
push: | |
branches: gh-pages | |
paths: 'package_adafruit_index.json' | |
workflow_dispatch: | |
inputs: | |
reason: | |
type: string | |
jobs: | |
trigger-libraries: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Trigger Adafruit Libraries | |
env: | |
GH_TOKEN: ${{ secrets.GH_REPO_TOKEN }} | |
run: | | |
# Rebuild reason either by esp32 or our own release | |
reason="${{ github.event.inputs.reason }}" | |
[[ -z "$reason" ]] && reason="rebuild by Adafruit SAMD/nRF new release" | |
# Get list of Adafruit repos with 'arduino-library' tag in topic | |
libs=$(gh repo list adafruit --no-archived --visibility public --limit 9999 --topic arduino-library --json name --jq '.[].name' | sort | xargs) | |
echo "::group::{There are `echo $libs | wc -w` libraries:}" | |
echo $libs | |
echo "::endgroup::" | |
for lib in $libs | |
do | |
echo "Triggering $lib" | |
gh api repos/adafruit/$lib/dispatches -f event_type="$reason" | |
# sleep a bit to prevent CI overflow | |
sleep 75 | |
done |