Understanding the Components
To master GitHub Actions, you need to understand how its parts work together. Think of it as a well-oiled machine: an event sparks the process, and a series of steps follow to reach the goal.
Interactive Execution Pipeline
Watch how an Event flows through the system to completion
System Idle. Waiting for trigger...
The High-Level Flow
Event
The Trigger
Workflow
The Automation
Job
The Executor
Runner
The Machine
Events
The catalyst that starts it all. It can be a code push, a pull request, or even a scheduled time.
Workflows
The main automated procedure. It's defined by a YAML file in your .github/workflows directory.
Jobs
A set of steps that run on the same runner. Jobs can run in parallel or wait for each other.
Actions
Reusable, standalone tasks. You can write your own or use ones from the GitHub Marketplace.
Runners
The virtual machine or container provided by GitHub (or your own) that performs the work.
Steps
Individual tasks within a job. These can be shell commands or calls to specific Actions.
The Hierarchy of Action
Event Occurs
Someone pushes code or opens a PR. GitHub detects this "event".
Workflow is Triggered
GitHub looks into your repository for any YAML files that "listen" to that event.
Jobs are Assigned
The workflow breaks down into Jobs. For example, one for testing and one for building.
Runners Spin Up
Each Job gets its own Runner (a fresh virtual machine).
Steps Execute
One by one, the commands run. If any step fails, the whole job usually stops.
