Skip to content

Chapter 1 of 7

GitHub Actions Foundations

GitHub Actions is a CI/CD and workflow automation platform built directly into GitHub. It allows you to run jobs in response to repository events using workflows that are defined in YAML files. These workflow files use either the .yaml or .yml extension and live under the .github/workflows/ directory inside your repository, where GitHub automatically discovers them.

At the top of the YAML hierarchy sits the workflow, which is an automated, configurable process that runs one or more jobs whenever a triggering event occurs. A job is a set of steps that all execute on the same runner, and by default jobs run in parallel with one another. Each step inside a job is either a shell command declared with run: or an invocation of an action declared with uses:. The runner itself is the server that executes the job; GitHub-hosted runners come in Ubuntu, Windows, and macOS flavors, while self-hosted runners are machines that you provision and register with your repository or organization.

The simplest workflow therefore has the shape of a workflow block with an on: trigger clause, a jobs: section listing one or more jobs, and within each job a sequence of steps that either run commands or invoke actions such as actions/checkout@v4, which checks your repository code out onto the runner so subsequent steps can operate on it.

All chapters
  1. 1GitHub Actions Foundations
  2. 2Triggering Workflows
  3. 3Jobs, Matrices, Concurrency, and Conditions
  4. 4Environment Variables, Outputs, and Context References
  5. 5Permissions, Tokens, and Security
  6. 6Artifacts, Caching, and Service Containers
  7. 7Reusable Workflows, Environments, and Deployments

Drill it

Reading is not remembering. These come from the Github Actions Ci Cd Recipes deck:

Q

What is GitHub Actions?

A CI/CD and workflow automation platform built into GitHub that runs jobs in response to repository events using YAML-defined workflows stored in .github/workfl...

Q

What file extension do GitHub Actions workflow files use?

.yaml or .yml, stored under .github/workflows/ in the repository.

Q

What is a workflow in GitHub Actions?

An automated, configurable process defined by a YAML file that runs one or more jobs and is triggered by events.

Q

What is a job in GitHub Actions?

A set of steps in a workflow that execute on the same runner; jobs run in parallel by default unless dependencies are declared with needs:.