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 e2a0d9010a13..f4d23c9caecf 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 workflow file. The example below only runs the workflow 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 `home` isn't provided, the default value 'The Octoverse' is printed.