Actions36
- File Actions
- Issue Actions
- Organization Actions
- Release Actions
- Repository Actions
- Review Actions
- User Actions
- Workflow Actions
Workflow → Dispatch
AI-generatedOverview
This node operation dispatches a GitHub Actions workflow event to trigger a workflow run in a specified repository. It allows users to specify the repository owner, repository name, workflow file or ID, git reference (branch, tag, or commit SHA), and input parameters for the workflow. It is useful for automating CI/CD pipelines or other automated processes defined in GitHub Actions workflows. For example, a user can trigger a deployment workflow on a specific branch with custom inputs.
Use Case Examples
- Trigger a deployment workflow on the 'main' branch of a repository with specific input parameters.
- Dispatch a workflow event to run tests on a feature branch by specifying the branch name as the git reference.
Properties
| Name | Meaning |
|---|---|
| Repository Owner | The owner of the GitHub repository where the workflow resides. Can be selected from a list, provided as a URL, or entered by name. |
| Repository Name | The name of the GitHub repository containing the workflow. Can be selected from a list, provided as a URL, or entered by name. |
| Workflow | The workflow to dispatch, identified by selecting from a list, by file name, or by ID. |
| Ref | The git reference for the workflow dispatch, such as a branch, tag, or commit SHA. The input method depends on the node version. |
| Inputs | A JSON object containing input parameters to pass to the workflow when dispatching it. |
Output
JSON
json- The JSON response from the GitHub API after dispatching the workflow event.
Dependencies
- GitHub API access via GitHub App authentication
Troubleshooting
- Invalid JSON in the 'Inputs' property will cause an error; ensure the JSON is valid.
- If the workflow to dispatch cannot be found, a 404 error is thrown; verify the workflow ID or file name is correct.
- Authentication errors may occur if the GitHub App credentials are incorrect or lack necessary permissions.
Links
- GitHub API - Create a workflow dispatch event - Official GitHub API documentation for dispatching workflow events.