go-gitea / gitea

Git with a cup of tea! Painless self-hosted all-in-one software development service, including Git hosting, code review, team collaboration, package registry and CI/CD
https://gitea.com
MIT License
44.82k stars 5.47k forks source link

I suggests adding a new a new endpoint to facilitate the dispatching of workflows. #31765

Open lunny opened 2 months ago

lunny commented 2 months ago

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:

Additional endpoints:

Originally posted by @bencurio in https://github.com/go-gitea/gitea/issues/28163#issuecomment-2202120215

KN4CK3R commented 2 months ago

Congratulations for the longest issue title 🎉