🎓 A1Learner
🔍
0 of 50 lessons completed

GitHub Actions: Reading Logs

A log is the written record of a workflow run. Reading logs is the skill of finding the red step and reading its error lines.

Find the red step

Open the failed run. Steps with a red cross failed. Green steps passed.

Actions tab > failed run > red step

Search the log

Long logs hide the error. Search for the word Error to jump to it.

Log search box: Error

A step that fails on purpose

This step exits with code 1. Code 1 means the command failed.

- name: Show a failing step
  run: node -e "process.exit(1)"

Example

name: Reading Logs Demo

on: push

jobs:
  fail-demo:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7
      - name: Show a failing step
        run: node -e "process.exit(1)"

Key points

  • Log: the written record of every step in a run.
  • Find the red step first, since it holds the error.
  • Expand a step to read its full output.
  • Use the log search box to find a word like Error or failed.
  • Read the last lines of the failing step, since the cause sits near the end.
  • A log is the record that shows where a run broke.

In this example, the workflow runs on every push. It checks out the code. The next step runs a tiny Node command. That command exits with code 1. The step turns red. The log shows the exit code error. The reader finds it by opening the red step.

Try it Yourself

Edit the code, then press Run.

Running is simulated · Rust Playground

Exercise

A run has gone red. Where should the reader look first?