workflow_jobs.md
March 27, 2021 ยท View on GitHub
Repo / Actions / Workflow Jobs API
Back to the "Repos API" | Back to the navigation
List jobs for a workflow run
https://docs.github.com/en/rest/reference/actions#list-jobs-for-a-workflow-run
$client->api('repo')->workflowJobs()->all('KnpLabs', 'php-github-api', $runId);
Get a job for a workflow run
https://docs.github.com/en/rest/reference/actions#get-a-job-for-a-workflow-run
$job = $client->api('repo')->workflowJobs()->all('KnpLabs', 'php-github-api', $jobId);
Download job logs for a workflow run
https://docs.github.com/en/rest/reference/actions#download-job-logs-for-a-workflow-run
$jobLogs = $client->api('repo')->workflowJobs()->downloadLogs('KnpLabs', 'php-github-api', $jobId);
file_put_contents('jobLogs.zip', $jobLogs);