provider actions POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches
@utdk/github /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches
Create a workflow dispatch event
You can use this endpoint to manually trigger a GitHub Actions workflow run. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. You must configure your GitHub Actions workflow to run when the [`workflow_dispatch` webhook](/developers/webhooks-and-events/webhook-events-and-payloads#workflow_dispatch) event occurs. The `inputs` are configured in the workflow file. For more information about how to configure the `workflow_dispatch` event in the workflow file, see "[Events that trigger workflows](/actions/reference/events-that-trigger-workflows#workflow_dispatch)." OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.
owner path required
The account owner of the repository. The name is not case sensitive.
string
repo path required
The name of the repository without the `.git` extension. The name is not case sensitive.
string
workflow_id path required
The ID of the workflow. You can also pass the workflow file name as a string.

Try it

Authentication
Configure credentials for GitHub v3 REST API
Gateway
The gateway proxies requests and injects credentials server-side. Configure credentials above, then enter your gateway URL.

Saved automatically to browser storage.

actions.createWorkflowDispatch
POST/repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches
You can use this endpoint to manually trigger a GitHub Actions workflow run. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. You must configure your GitHub Actions workflow to run when the [`workflow_dispatch` webhook](/developers/webhooks-and-events/webhook-events-and-payloads#workflow_dispatch) event occurs. The `inputs` are configured in the workflow file. For more information about how to configure the `workflow_dispatch` event in the workflow file, see "[Events that trigger workflows](/actions/reference/events-that-trigger-workflows#workflow_dispatch)." OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

Parameters

required

The account owner of the repository. The name is not case sensitive.

required

The name of the repository without the `.git` extension. The name is not case sensitive.

required

The ID of the workflow. You can also pass the workflow file name as a string.

Input

required

The git reference for the workflow. The reference can be a branch or tag name.

Input keys and values configured in the workflow file. The maximum number of properties is 25. Any default properties configured in the workflow file will be used when `inputs` are omitted.

Whether the response should include the workflow run ID and URLs.

Enter a gateway URL above to enable sending.

Code snippet
Updates live as you fill in the form above.

TypeScript

import github from '@utdk/github';

await github.actions.createWorkflowDispatch()