Closed
Description
I suggests adding a new API endpoint to facilitate the dispatching of workflows. It empowers developers and teams to automate repetitive tasks and orchestrate complex workflows efficiently.
Create a workflow dispatch event
Payload:
POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches
Content-Type: application/json
Authorization: Bearer <token>
{
"ref": "main",
"inputs": {
"param1": "value1",
"param2": "value2"
}
}
Permissions:
- "Actions" repository permissions (write)
Additional endpoints:
- Enable workflow (
PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable
) - Disable workflow (
PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable
) - Get a workflow (
GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}
) - Get workflow usage (
GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing
) - List repository workflows (
GET /repos/{owner}/{repo}/actions/workflows
)
Originally posted by @bencurio in #28163 (comment)