GitHub Actions Tutorial — Jobs & Runners
Chapter 4 — Jobs & Runners
Jobs are the building blocks of your workflow — each job defines a set of steps that run on a dedicated runner (virtual machine). Understanding how to structure jobs, control their execution order, pass data between them, and choose the right runner is essential for building efficient CI/CD pipelines.
What You’ll Learn
- How to define and name jobs
- GitHub-hosted runner specifications and selection
- Controlling execution order with
needs: - Passing data between jobs with outputs
- Running jobs inside Docker containers
Topics Covered
1. Defining Jobs
Learn the anatomy of a job: ID, name, runner, timeouts, conditions, and the difference between parallel and sequential execution.
2. GitHub-Hosted Runners
Explore the available runners — Ubuntu, Windows, macOS — their hardware specs, pre-installed software, and when to choose each.
3. Job Dependencies
Use needs: to create execution chains and fan-in/fan-out patterns. Control which jobs wait for which.
4. Job Outputs
Pass data from one job to another using outputs and the needs context. Essential for multi-stage pipelines.
5. Container Jobs
Run your job steps inside a Docker container instead of directly on the runner. Perfect for consistent, reproducible build environments.
Practice
Test your understanding with hands-on exercises.
← Previous: Chapter 3: Triggers
Next: Chapter 5: Steps & Actions →