New version: TiledFactorizations v1.5.1 (#390) #249
This file contains hidden or 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: TriggerTagBot | |
| on: | |
| push: | |
| branches: | |
| - master | |
| workflow_dispatch: | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| with: | |
| fetch-depth: 2 | |
| - name: Trigger TagBot for each updated package | |
| env: | |
| TAGBOT_PAT: ${{ secrets.TAGBOT_TOKEN }} | |
| run: | | |
| PACKAGENAMES=$(git diff HEAD^ --stat | grep /Versions.toml | cut -d/ -f2 | sort -u) | |
| if [ -z "$PACKAGENAMES" ]; then | |
| echo "No package name detected, skipping dispatch" | |
| exit 0 | |
| fi | |
| echo "Package names:" | |
| echo "$PACKAGENAMES" | |
| payload=$(printf '{"event_type":"TagBot","client_payload":{"repository":"%s"}}' "$GITHUB_REPOSITORY") | |
| while IFS= read -r packagename; do | |
| [ -z "$packagename" ] && continue | |
| echo "Triggering TagBot for: $packagename" | |
| curl --http1.1 -X POST \ | |
| "https://api.github.com/repos/HolyLab/${packagename}.jl/dispatches" \ | |
| -H 'Accept: application/vnd.github.everest-preview+json' \ | |
| -H "Authorization: Bearer $TAGBOT_PAT" \ | |
| -H 'Content-Type: application/json' \ | |
| --verbose \ | |
| --data "$payload" | |
| done <<< "$PACKAGENAMES" |