{"meta":{"title":"Viewing workflow run history","intro":"You can view logs for each run of a workflow. Logs include the status for each job and step in a workflow.","product":"GitHub Actions","breadcrumbs":[{"href":"/en/actions","title":"GitHub Actions"},{"href":"/en/actions/how-tos","title":"How-tos"},{"href":"/en/actions/how-tos/monitor-workflows","title":"Monitor workflows"},{"href":"/en/actions/how-tos/monitor-workflows/view-workflow-run-history","title":"View workflow run history"}],"documentType":"article"},"body":"# Viewing workflow run history\n\nYou can view logs for each run of a workflow. Logs include the status for each job and step in a workflow.\n\nRead access to the repository is required to perform these steps.\n\n<div class=\"ghd-tool webui\">\n\n1. On GitHub, navigate to the main page of the repository.\n2. Under your repository name, click **<svg version=\"1.1\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" class=\"octicon octicon-play\" aria-label=\"play\" role=\"img\"><path d=\"M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Zm4.879-2.773 4.264 2.559a.25.25 0 0 1 0 .428l-4.264 2.559A.25.25 0 0 1 6 10.559V5.442a.25.25 0 0 1 .379-.215Z\"></path></svg> Actions**.\n\n   ![Screenshot of the tabs for the \"github/docs\" repository. The \"Actions\" tab is highlighted with an orange outline.](/assets/images/help/repository/actions-tab-global-nav-update.png)\n3. In the left sidebar, click the workflow you want to see.\n\n   ![Screenshot of the left sidebar of the \"Actions\" tab. A workflow, \"CodeQL,\" is outlined in dark orange.](/assets/images/help/actions/superlinter-workflow-sidebar.png)\n4. From the list of workflow runs, click the name of the run to see the workflow run summary.\n\n</div>\n\n<div class=\"ghd-tool cli\">\n\n> \\[!NOTE]\n> To learn more about GitHub CLI, see [About GitHub CLI](/en/github-cli/github-cli/about-github-cli).\n\n## Viewing recent workflow runs\n\nTo list the recent workflow runs, use the `run list` subcommand.\n\n```shell\ngh run list\n```\n\nTo specify the maximum number of runs to return, you can use the `-L` or `--limit` flag . The default is `10`.\n\n```shell\ngh run list --limit 5\n```\n\nTo only return runs for the specified workflow, you can use the `-w` or `--workflow` flag. Replace `workflow` with either the workflow name, workflow ID, or workflow file name. For example, `\"Link Checker\"`, `1234567`, or `\"link-check-test.yml\"`.\n\n```shell\ngh run list --workflow WORKFLOW\n```\n\n## Viewing details for a specific workflow run\n\nTo 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.\n\n```shell\ngh run view RUN_ID\n```\n\nTo include job steps in the output, use the `-v` or `--verbose` flag.\n\n```shell\ngh run view RUN_ID --verbose\n```\n\nTo view details for a specific job in the run, use the `-j` or `--job` flag. Replace `job-id` with the ID of the job that you want to view.\n\n```shell\ngh run view --job JOB_ID\n```\n\nTo view the full log for a job, use the `--log` flag.\n\n```shell\ngh run view --job JOB_ID --log\n```\n\nUse the `--exit-status` flag to exit with a non-zero status if the run failed. For example:\n\n```shell\ngh run view 0451 --exit-status && echo \"run pending or passed\"\n```\n\n</div>"}