Lesson 1 / 25

What GitHub Actions Does

CI/CD and automation from events.

Events trigger workflows

GitHub Actions runs automation defined in YAML workflows stored in .github/workflows/. Workflows are triggered by events (a push, a pull request, a schedule, a manual dispatch, an issue being opened, a release) and run jobs on runners. Common uses: continuous integration (build, lint, test on every pull request), continuous delivery (publish packages, deploy to environments), and repository automation (labelling, stale issue handling, dependency updates). Thousands of reusable actions from the Marketplace provide building blocks.

Automation that lives with your code

Workflows in your repository run jobs on runners when events happen.

Three ideas: what Actions is, workflow anatomy, runners.
Figure 1.1 — Actions, workflows and runners.

A kitchen with recipes on the wall

When an order arrives (an event), the cooks (runners) follow the posted recipe (workflow) step by step; the recipe is versioned with the menu (your code).

Start with CI on pull requests

Running tests on every pull request is the highest-value first workflow for most repositories.

Quick check: Where are GitHub Actions workflows stored?

  • Only in organisation settings
  • In the repository wiki
  • In .github/workflows/ in the repository
  • In package.json
Answer

In .github/workflows/ in the repository — Workflows are versioned with the code.