Skip to main content

작업 조건 식 로그 보기

GitHub Actions의 작업 수준 if 조건에 대한 식 평가 로그에 접근하고 이를 해석하는 방법을 배웁니다.

이 문서의 내용

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.

참고 항목

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 Enabling debug logging.