File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # Template: place this in each mirror repo as .github/workflows/notify-monorepo.yml
2+ #
3+ # Uses the org-wide GIT_TOKEN secret (PAT with repo scope).
4+ name : Notify Monorepo
5+
6+ on :
7+ push :
8+ branches : [main]
9+
10+ jobs :
11+ notify :
12+ name : Trigger monorepo sync
13+ runs-on : ubuntu-latest
14+ # Only trigger if the push was NOT from the monorepo sync bot
15+ if : github.actor != 'github-actions[bot]'
16+ steps :
17+ - name : Dispatch to monorepo
18+ run : |
19+ curl -sf -X POST \
20+ -H "Authorization: token ${{ secrets.GIT_TOKEN }}" \
21+ -H "Accept: application/vnd.github.v3+json" \
22+ "https://api.github.com/repos/sferarc/pgbeam/dispatches" \
23+ -d '{
24+ "event_type": "mirror-push",
25+ "client_payload": {
26+ "mirror": "${{ github.event.repository.name }}",
27+ "sha": "${{ github.sha }}"
28+ }
29+ }'
You can’t perform that action at this time.
0 commit comments