workflows.md
March 27, 2021 ยท View on GitHub
Repo / Actions / Workflows API
Back to the "Repos API" | Back to the navigation
List repository workflows
https://docs.github.com/en/rest/reference/actions#list-repository-workflows
$workflows = $client->api('repo')->workflows()->all('KnpLabs', 'php-github-api');
Get a workflow
https://docs.github.com/en/rest/reference/actions#get-a-workflow
$workflow = $client->api('repo')->workflows()->show('KnpLabs', 'php-github-api', $workflow);
Get workflow usage
https://docs.github.com/en/rest/reference/actions#get-workflow-usage
$usage = $client->api('repo')->workflows()->usage('KnpLabs', 'php-github-api', $workflow);
Dispatch a workflow
https://docs.github.com/en/rest/reference/actions#create-a-workflow-dispatch-event
$client->api('repo')->workflows()->dispatches('KnpLabs', 'php-github-api', $workflow, 'main');