From be128855eb71bdcd8efddcb415d7e57aa20f9d09 Mon Sep 17 00:00:00 2001 From: Jakub Warczarek Date: Wed, 14 Oct 2020 19:24:00 +0200 Subject: [PATCH 1/3] Add more details about workflow_run * need to exists on default branch * run only on it --- content/actions/reference/events-that-trigger-workflows.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/actions/reference/events-that-trigger-workflows.md b/content/actions/reference/events-that-trigger-workflows.md index 279e7c34c526..f1c1c1325476 100644 --- a/content/actions/reference/events-that-trigger-workflows.md +++ b/content/actions/reference/events-that-trigger-workflows.md @@ -657,7 +657,7 @@ on: If you need to filter branches from this event, you can use `branches` or `branches-ignore`. -In this example, a workflow is configured to run after the separate “Run Tests” workflow completes. +In this example, a workflow is configured to run after the separate “Run Tests” workflow completes. Workflow has to exists on default repository branch and will only run on it, regardless of whether it is triggered by a workflow run on other branches or not. ```yaml on: From 73caa70b530f2fc08855d68caec65d5f5d81fd58 Mon Sep 17 00:00:00 2001 From: Jakub Warczarek Date: Wed, 14 Oct 2020 20:59:25 +0200 Subject: [PATCH 2/3] Improve --- content/actions/reference/events-that-trigger-workflows.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/actions/reference/events-that-trigger-workflows.md b/content/actions/reference/events-that-trigger-workflows.md index f1c1c1325476..9801f826bd14 100644 --- a/content/actions/reference/events-that-trigger-workflows.md +++ b/content/actions/reference/events-that-trigger-workflows.md @@ -655,9 +655,9 @@ on: {% data reusables.webhooks.workflow_run_desc %} -If you need to filter branches from this event, you can use `branches` or `branches-ignore`. +If you need to filter branches from this event, you can use `branches` or `branches-ignore`. Workflow has to exist on the default repository branch and will only run on it, regardless of whether it is triggered by a workflow run on other branches or not. -In this example, a workflow is configured to run after the separate “Run Tests” workflow completes. Workflow has to exists on default repository branch and will only run on it, regardless of whether it is triggered by a workflow run on other branches or not. +In this example, a workflow is configured to run after the separate “Run Tests” workflow completes. ```yaml on: From 00d1a5920ffb6472506f669359883fa3a817f2bf Mon Sep 17 00:00:00 2001 From: Jakub Warczarek Date: Wed, 4 Nov 2020 10:06:45 +0100 Subject: [PATCH 3/3] Add table about payload, activity, etc. to workflow_run section Co-authored-by: Rachael Sewell --- content/actions/reference/events-that-trigger-workflows.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/content/actions/reference/events-that-trigger-workflows.md b/content/actions/reference/events-that-trigger-workflows.md index 9801f826bd14..71e291bdd2eb 100644 --- a/content/actions/reference/events-that-trigger-workflows.md +++ b/content/actions/reference/events-that-trigger-workflows.md @@ -655,7 +655,11 @@ on: {% data reusables.webhooks.workflow_run_desc %} -If you need to filter branches from this event, you can use `branches` or `branches-ignore`. Workflow has to exist on the default repository branch and will only run on it, regardless of whether it is triggered by a workflow run on other branches or not. +| Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` | +| --------------------- | -------------- | ------------ | -------------| +| [`workflow_run`](/webhooks/event-payloads/#workflow_run) | - n/a | Last commit on default branch | Default branch | + +If you need to filter branches from this event, you can use `branches` or `branches-ignore`. In this example, a workflow is configured to run after the separate “Run Tests” workflow completes.