Skip to content

Commit

Permalink
+ CI rule
Browse files Browse the repository at this point in the history
  • Loading branch information
patrick borowy committed Aug 19, 2024
1 parent 01772d4 commit e8e64a9
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/build_docker_production.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Notify External Repository on Update

on:
workflow_dispatch:
release:
types: [published]

jobs:
notify-external-update:
runs-on: ubuntu-latest
steps:
- name: Trigger Repository Dispatch Event
env:
REPOSITORY_ACCESS: ${{ secrets.REPOSITORY_ACCESS }}
run: |
# Extract the repository name from the full GITHUB_REPOSITORY environment variable (format "owner/repo")
REPO_NAME="${GITHUB_REPOSITORY#*/}"
# The target repository where you want to trigger the dispatch event
TARGET_OWNER="exorde-labs"
TARGET_REPO="spot"
# Trigger a repository dispatch event in the target repository
curl -X POST \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: token $REPOSITORY_ACCESS" \
"https://api.github.com/repos/${TARGET_OWNER}/${TARGET_REPO}/dispatches" \
-d "{\"event_type\": \"trigger-build-event\", \"client_payload\": {\"moduleName\": \"${REPO_NAME}\"}}"

0 comments on commit e8e64a9

Please sign in to comment.