File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed
Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Notify External Repository on Update
2+
3+ on :
4+ workflow_dispatch :
5+ release :
6+ types : [published]
7+
8+ jobs :
9+ notify-external-update :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - name : Trigger Repository Dispatch Event
13+ env :
14+ REPOSITORY_ACCESS : ${{ secrets.REPOSITORY_ACCESS }}
15+ run : |
16+ # Extract the repository name from the full GITHUB_REPOSITORY environment variable (format "owner/repo")
17+ REPO_NAME="${GITHUB_REPOSITORY#*/}"
18+
19+ # The target repository where you want to trigger the dispatch event
20+ TARGET_OWNER="exorde-labs"
21+ TARGET_REPO="spot"
22+
23+ # Trigger a repository dispatch event in the target repository
24+ curl -X POST \
25+ -H "Accept: application/vnd.github.v3+json" \
26+ -H "Authorization: token $REPOSITORY_ACCESS" \
27+ "https://api.github.com/repos/${TARGET_OWNER}/${TARGET_REPO}/dispatches" \
28+ -d "{\"event_type\": \"trigger-build-event\", \"client_payload\": {\"moduleName\": \"${REPO_NAME}\"}}"
You can’t perform that action at this time.
0 commit comments