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
- Navigate to the workflow run summary.
- Click on the job.
- Click .
- Select Download log archive.
- Extract the ZIP file and open the
JOB-NAME/system.txtfile.
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
| Line | Description |
|---|---|
| Evaluating | The original if expression from your workflow file. |
| Expanded | The expression with context values substituted. This shows you exactly what values were used at runtime. |
| Result | The 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.
Hinweis
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 Aktivieren der Debugprotokollierung.