Fix cross-repo workflow trigger mechanism
This commit is contained in:
parent
2b3a504f85
commit
8fba17cb99
1 changed files with 4 additions and 4 deletions
8
.github/workflows/issue-notify.yml
vendored
8
.github/workflows/issue-notify.yml
vendored
|
|
@ -30,10 +30,10 @@ jobs:
|
|||
|
||||
echo "Processing issue #${ISSUE_NUMBER}"
|
||||
|
||||
# Trigger internal workflow via workflow_dispatch
|
||||
gh workflow run ${TARGET_WORKFLOW} \
|
||||
--repo ${TARGET_REPO} \
|
||||
-f "issue_url=${ISSUE_URL}" 2>/dev/null || {
|
||||
# Trigger internal workflow via repository_dispatch
|
||||
gh api repos/${TARGET_REPO}/dispatches \
|
||||
-f event_type=issue_opened \
|
||||
-f client_payload[issue_url]="${ISSUE_URL}"|| {
|
||||
echo "Issue notification sent"
|
||||
exit 0
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue