Jobs, Steps, and Runners
100%

Continuous Integration · Lesson 3

Jobs, Steps, and Runners

Learn to find a workflow's jobs, steps, and runner in a short GitHub Actions file.

A workflow is the whole automated process. A job groups work assigned to a runner, which is the machine or environment that executes it. A step is one operation inside a job.

Reading a Small Workflow

This example runs one job on a GitHub-hosted Ubuntu runner. A workflow like this lives under .github/workflows/ in a GitHub repository.

name: Page check
on: push
jobs:
  check:
    runs-on: ubuntu-latest
    steps:
      - name: Get the repository
        uses: actions/checkout@v6
      - name: Find the heading
        run: grep -q '<h1>Welcome</h1>' index.html

The job ID is check. The runs-on field selects the environment. uses invokes a reusable action, here to make repository files available. run executes a command on the runner.

Which field selects where the check job runs?

Following the Steps

Steps in one job run in their listed order by default. The check reads a file from the repository, so checkout comes first. A later step in the same job can use files written by an earlier step.

What would the grep step be missing if checkout were moved after it on a fresh runner?

Keeping Jobs Separate

Separate jobs may run at the same time. Each GitHub-hosted job gets its own runner, so a file written in one job is unavailable in another unless the workflow transfers it. If one job depends on another job's success, declare the dependency with needs and use an artifact to move files when required.

A build job writes site.tar.gz. A later job runs on another hosted runner. How should it receive the file?

Lesson complete

You finished Jobs, Steps, and Runners

You can now read the main parts of a CI workflow.

  • Find a job and its runner.

  • Interpret a reusable action and a shell step.

  • Recognize when jobs need a dependency or a file transfer.

Keep your learning progress

Create a free account to save this lesson and continue learning on any device.

Create a free account
Next Lesson
Back to Continuous Integration