Read access to the repository is required to perform these steps.
- On GitHub.com, navigate to the main page of the repository.
- Under your repository name, click Actions.
- In the left sidebar, click the workflow you want to see.
- From the list of workflow runs, click the name of the run you want to see.
To learn more about GitHub CLI, see "About GitHub CLI."
To list the recent workflow runs, use the
run list subcommand.
gh run list
To specify the maximum number of runs to return, you can use the
--limit flag . The default is
gh run list --limit 5
To only return runs for the specified workflow, you can use the
--workflow flag. Replace
workflow with either the workflow name, workflow ID, or workflow file name. For example,
gh run list --workflow workflow
To display details for a specific workflow run, use the
run view subcommand. Replace
run-id with the ID of the run that you want to view. If you don't specify a
run-id, GitHub CLI returns an interactive menu for you to choose a recent run.
gh run view run-id
To include job steps in the output, use the
gh run view run-id --verbose
To view details for a specific job in the run, use the
--job flag. Replace
job-id with the ID of the job that you want to view.
gh run view --job job-id
To view the full log for a job, use the
gh run view --job job-id --log
--exit-status flag to exit with a non-zero status if the run failed. For example:
gh run view 0451 --exit-status && echo "run pending or passed"