Skip to content

Merge pull request #112 from adafruit/samd-1.7.15-nrf-1.6.1 #66

Merge pull request #112 from adafruit/samd-1.7.15-nrf-1.6.1

Merge pull request #112 from adafruit/samd-1.7.15-nrf-1.6.1 #66

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