Mastering GitHub Actions
A hands-on GitHub Actions series that builds workflows up from a minimal example to advanced CI/CD pipelines, one concept at a time.
Some GitHub Actions workflows can look really complex, but this is often the result of incremental changes over time, which added more and more capabilities to the workflow.
With this series we’ll build up workflows starting from the most basic examples, to really complex and powerful ones. Hopefully this helps you understand GitHub Actions better.
Articles in this series#
Introduction Learn how to automate your development workflows, from testing to deployment, with GitHub Actions. Triggers Learn how to set up GitHub Action triggers for push, pull requests, scheduled events, and manual runs to streamline your CI/CD pipeline. Pull Request vs Pull Request Target Understand the differences between the `pull_request` and `pull_request_target` triggers in GitHub Actions. Jobs and Steps Understand the relation between jobs and steps to automate your CI/CD pipeline across various environments. Conditions Conditional logic in GitHub Actions: control job and step execution with if statements, expressions, and context variables to build smarter workflows. Concurrency Stop wasting CI minutes on redundant runs. The GitHub Actions concurrency keyword: cancel superseded PR runs, serialize deploys, avoid group-key gotchas. Environment Variables The environment variables GitHub Actions defines for every run, how to use them in your workflows, and how to set custom variables of your own. Passing Data Between Jobs The modern way to pass data between steps and jobs in GitHub Actions: step outputs, job outputs, $GITHUB_ENV, and artifacts, with working examples. The Matrix Strategy Understand the matrix strategy in GitHub Actions and how to use it to run jobs across multiple configurations. Caching Dependencies Learn how to use caching in GitHub Actions to speed up your workflows by caching dependencies and other frequently reused files. Cache Keys & Scopes A deep dive into GitHub Actions caching: building a cache key with hashFiles, restore-keys fallback, cache immutability, branch scope, and the 10 GB limit. Docker Layer Caching Speed up Docker image builds in GitHub Actions by caching layers with Buildx. The gha, registry, inline, and local backends compared, with YAML examples. Environments Learn how to isolate secrets and manage different stages for your GitHub Actions workflows using environments. Triggering a Workflow from Another Workflow Learn how to trigger a workflow from another workflow, even from another repository, using a GitHub App token and not personal access tokens. Debugging Learn how to debug GitHub Actions, using the Act docker image or an interactive session into the live runner instance. Larger Runners Learn how to use larger custom GitHub Actions runners to speed up your workflows. Self-hosted Runners Self-hosted GitHub Actions runners give you control over the build environment and cost far less than GitHub-hosted ones. Here are the ways to set them up. Actions Runner Controller on Kubernetes with MicroK8s Set up Actions Runner Controller (ARC) on a MicroK8s cluster: install ARC, configure a GitHub App for auth, and deploy scalable self-hosted runners.