Skip to main content

Viewing job condition expression logs

Learn how to access and interpret expression evaluation logs for job-level if conditions in GitHub Actions.

Dans cet article

When a job's if condition is evaluated, GitHub Actions logs the expression evaluation to help you understand the result. This is useful for debugging both why a job was skipped and why a job ran when you expected it to be skipped.

Accessing expression logs

  1. Navigate to the workflow run summary.
  2. Click on the job.
  3. Click .
  4. Select Download log archive.
  5. Extract the ZIP file and open the JOB-NAME/system.txt file.

Understanding the log output

The system log shows the expression evaluation:

Evaluating: (success() && ((github.repository == 'octo-org/octo-repo-prod')))
Expanded: (true && (('my-username/octo-repo-prod' == 'octo-org/octo-repo-prod')))
Result: false
LineDescription
EvaluatingThe original if expression from your workflow file.
ExpandedThe expression with context values substituted. This shows you exactly what values were used at runtime.
ResultThe final evaluation result (true or false).

In this example, the expanded line reveals that github.repository was 'my-username/octo-repo-prod' (not 'octo-org/octo-repo-prod'), which caused the condition to evaluate to false.

Remarque

Expression logs are only available for job-level if conditions. For step-level conditions, you can enable debug logging to see expression evaluation in the job logs. For more information, see Activation de la journalisation du débogage.