GitHub Actions Tutorial
Learn GitHub Actions from scratch: workflow syntax, events and filters, secrets, dependency caching, artifacts, matrix builds, Docker images, and deploying to AWS with OIDC instead of stored keys.
8 lessons in this tutorial
Introduction to GitHub Actions
Learn what GitHub Actions is and how it runs your build: workflows, jobs, steps and runners, plus a first working pipeline you can commit today.
GitHub Actions Workflow Syntax
Understand the YAML behind a GitHub Actions workflow: events and filters, job dependencies with needs, if conditionals, contexts and expressions.
GitHub Actions Secrets and Variables
Store workflow credentials without leaking them: repository, environment and organisation scopes, log masking and why fork pull requests get no secrets.
Caching Dependencies in GitHub Actions
Speed up GitHub Actions with actions/cache: write a key that hits, use restore-keys and built-in setup caching, and see why a cache can slow a build.
GitHub Actions Artifacts
Move files between GitHub Actions jobs and keep build output: upload-artifact v4 behaviour, retention, the immutability change and when a cache fits better.
GitHub Actions Matrix Builds
Run one GitHub Actions job across many versions and platforms: matrix syntax, include and exclude, fail-fast, max-parallel and avoiding a runaway matrix.
Build and Push Docker Images with GitHub Actions
Build and push Docker images with GitHub Actions: set up Buildx, log in to GHCR or ECR, use layer caching that works, tag sensibly and build multi-arch.
Deploy to AWS from GitHub Actions with OIDC
Deploy to AWS from GitHub Actions without stored keys: create the OIDC provider, write the IAM trust policy claim by claim, scope sub and fix common errors.
GitHub Actions Tutorial: common questions
Is GitHub Actions free?
Public repositories get free minutes on GitHub-hosted runners, and private repositories get a monthly free allowance that depends on your plan. Self-hosted runners do not consume those minutes.
How long does it take to learn GitHub Actions?
You can write a working build-and-test workflow in an afternoon. Secrets, caching, matrix builds, reusable workflows and deploying with OIDC take a week or two of practice to use confidently.
Do I need Docker to use GitHub Actions?
No. Most workflows run directly on the runner. Docker becomes relevant when you build and push images, or run jobs inside a container, which later lessons cover.
What is the difference between a workflow, a job and a step?
A workflow is a YAML file triggered by an event. It contains jobs, which run on separate runners and can run in parallel. Each job is a sequence of steps, which are shell commands or reusable actions.