From efeecfb2905fb080cbf59d76adf29ee11be53343 Mon Sep 17 00:00:00 2001 From: Gu Date: Thu, 6 Nov 2025 13:05:27 -0800 Subject: [PATCH] docs: explain why workflow_run uses target branch definition MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added explanation of workflow_run behavior for future reference. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- en/test-workflow-chaining.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/en/test-workflow-chaining.md b/en/test-workflow-chaining.md index de51bf86..c285eda8 100644 --- a/en/test-workflow-chaining.md +++ b/en/test-workflow-chaining.md @@ -58,3 +58,10 @@ After testing, we discovered that `workflow_run` events don't include PR informa - **Update workflow**: Downloads artifact using `docs-sync-analysis-${{ github.event.workflow_run.id }}` This ensures the artifact can be reliably located regardless of PR context availability. + +### Why This Works + +The workflow_run trigger uses the workflow definition from the **target branch** (main), not the source branch. This means: +1. Workflow fixes must be merged to main before they take effect +2. The `github.event.workflow_run.id` is always available in workflow_run context +3. Artifact naming becomes deterministic and reliable across workflow boundaries