From 265d64dd1abe0685d8c6703eb819d744f481db08 Mon Sep 17 00:00:00 2001 From: Tierney Cyren Date: Mon, 2 Nov 2020 16:57:55 -0500 Subject: [PATCH 1/2] docs: add basic example and linkf ro workflow_dispatch --- .../managing-workflow-runs/manually-running-a-workflow.md | 4 +++- .../actions/reference/events-that-trigger-workflows.md | 8 ++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/content/actions/managing-workflow-runs/manually-running-a-workflow.md b/content/actions/managing-workflow-runs/manually-running-a-workflow.md index f89a9ab972a9..66e32aa57499 100644 --- a/content/actions/managing-workflow-runs/manually-running-a-workflow.md +++ b/content/actions/managing-workflow-runs/manually-running-a-workflow.md @@ -10,7 +10,9 @@ versions: {% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %} -To run a workflow manually, the workflow must be configured to run on the `workflow_dispatch` event. For more information, see "[Events that trigger workflows](/actions/reference/events-that-trigger-workflows)." +### Configuring a workflow to run manually + +To run a workflow manually, the workflow must be configured to run on the `workflow_dispatch` event. For more information about configuring the `workflow_dispatch` event, see "[Events that trigger workflows](/actions/reference/events-that-trigger-workflows#workflow_dispatch)". ### Running a workflow on {% data variables.product.prodname_dotcom %} diff --git a/content/actions/reference/events-that-trigger-workflows.md b/content/actions/reference/events-that-trigger-workflows.md index e1373d36d1e4..db62a5886ba1 100644 --- a/content/actions/reference/events-that-trigger-workflows.md +++ b/content/actions/reference/events-that-trigger-workflows.md @@ -98,6 +98,14 @@ You can manually trigger a workflow run using the {% data variables.product.prod To trigger the custom `workflow_dispatch` webhook event using the REST API, you must send a `POST` request to a {% data variables.product.prodname_dotcom %} API endpoint and provide the `ref` and any required `inputs`. For more information, see the "[Create a workflow dispatch event](/rest/reference/actions/#create-a-workflow-dispatch-event)" REST API endpoint. +##### Example + +To use the `workflow_dispatch` event, you need to include it as a trigger in your GitHub Actions YAML. The example below only run a GitHub Action when it's manually triggered: + +```yaml +on: workflow_dispatch +``` + ##### Example workflow configuration This example defines the `name` and `home` inputs and prints them using the `github.event.inputs.name` and `github.event.inputs.home` contexts. If a `name` isn't provided, the default value 'Mona the Octocat' is printed. From b452c92ad8859593ea666b5c9af4ad0d9697b3bf Mon Sep 17 00:00:00 2001 From: Tierney Cyren Date: Mon, 9 Nov 2020 15:52:25 -0500 Subject: [PATCH 2/2] docs: update phrasing to be more on-brand Co-authored-by: Rachael Sewell --- 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 db62a5886ba1..4d9607991011 100644 --- a/content/actions/reference/events-that-trigger-workflows.md +++ b/content/actions/reference/events-that-trigger-workflows.md @@ -100,7 +100,7 @@ You can manually trigger a workflow run using the {% data variables.product.prod ##### Example -To use the `workflow_dispatch` event, you need to include it as a trigger in your GitHub Actions YAML. The example below only run a GitHub Action when it's manually triggered: +To use the `workflow_dispatch` event, you need to include it as a trigger in your GitHub Actions workflow file. The example below only runs the workflow when it's manually triggered: ```yaml on: workflow_dispatch