How GitHub Actions works, drawn — a push to the repository starts a run of the workflow that asks for it, the run's job runs on a fresh runner, and the runner's steps act on other places, here Docker Hub, a cluster on AWS and Slack.
GitHub Actions runs a workflow when something happens in a repository.
- An event in the repository, such as a push, starts a run of every workflow that asks for it.
- The run's job runs on a runner: a fresh virtual machine GitHub creates for it.
- The runner carries out the job's steps, and the steps act on other places.
Reading the drawing
- Our workstation, top left: where we push from.
- The repository, under it: its files, its commits on
main with each one's mark, and the workflow file.- The lines of the file the current step comes from are lit.
- GitHub Actions, middle: the event it received, the run with its job's steps, and the runner.
- A step is ○ waiting, ● running or ✓ done.
- The places the job reaches, right: Docker Hub, a Kubernetes cluster on AWS, and Slack.
- The events, far right: each step's explanation.
The workflow file
The workflow in the drawing is cut to the shape of a run: it leaves out the logins each place asks for.