We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6ca8698 commit 87bf76aCopy full SHA for 87bf76a
1 file changed
.github/workflows/orchestrator.yml
@@ -39,6 +39,15 @@ jobs:
39
STATUS=$(echo "$BODY" | grep "Status:" | cut -d':' -f2 | xargs)
40
CURRENT=$(echo "$BODY" | grep "Current:" | cut -d':' -f2 | xargs | tr -d '#')
41
42
+ # Guard: Only process workflow_run if it matches the CURRENT task
43
+ if [ "$EVENT_NAME" == "workflow_run" ]; then
44
+ RUN_TITLE="${{ github.event.workflow_run.display_title }}"
45
+ if [[ "$RUN_TITLE" != *"$CURRENT"* ]]; then
46
+ echo "Workflow run '$RUN_TITLE' does not match current task #$CURRENT. Skipping."
47
+ exit 0
48
+ fi
49
50
+
51
# If not IN_PROGRESS, only allow manual trigger to start
52
if [ "$STATUS" != "IN_PROGRESS" ] && [ "$EVENT_NAME" != "issue_comment" ]; then
53
echo "Status is $STATUS. Waiting for manual /orchestrate command."
0 commit comments