Forrest logo
back to the gh tool

gh-run:tldr:9d4a2

gh-run: Display the log of a job.
$ gh run view --job=${job_number} --log
try on your machine

The command gh run view --job=${job_number} --log is used to view the logs of a specific job run in GitHub Actions. Here's the breakdown of each part of the command:

  • gh: This refers to the GitHub CLI (Command-Line Interface) tool. It provides a command-line interface to interact with GitHub and perform various operations.
  • run: This is the command to interact with GitHub Actions workflows and job runs.
  • view: This sub-command is used to view the details of a specific run.
  • --job=${job_number}: This specifies the identifier (job number) of the job run for which you want to view the logs. ${job_number} is a placeholder that should be replaced with the actual job number. Each job within a workflow run is assigned a unique number.
  • --log: This option is used to display the logs associated with the specified job run. It allows you to see the detailed output and status of the job, including any error messages or warnings.

In summary, the command gh run view --job=${job_number} --log is used to retrieve and display the logs of a specific job run within a GitHub Actions workflow.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the gh tool