Skip to content

Commit e8e64a9

Browse files
author
patrick borowy
committed
+ CI rule
1 parent 01772d4 commit e8e64a9

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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}\"}}"

0 commit comments

Comments
 (0)