Foreword
Read little, type a lot. Every push tests the code, every tag builds a release, every image is signed, and only what a human has approved goes to production – that is CI/CD as it should be. For many teams, what sits in between is a YAML file that nobody fully understands anymore.
This book makes you confident with GitHub Actions. You learn workflows, jobs and steps, triggers and expressions, matrix, cache and artifacts. Then you build containers with Buildx, push them to the GitHub Container Registry and publish releases. You secure the supply chain – Trivy, SBOM, provenance, cosign – and the workflows themselves: permissions, pinning, injection, OIDC, environments. At the end you have your own runners on your VM and in Kubernetes, reusable workflows and an action of your own.
The common thread is notes-api, a small notes API in
Go. It moves into your own repository notes-actions, gets
tested, linted, built, scanned, signed, published and finally rolled out
to a k3s on your VM.
The book is for developers, admins and platform folks who know Git, Docker and the command line and want to understand their pipelines instead of copying them.
The training rules
- Type, don’t copy. Every command once yourself.
- Compare with Expected. After every drill you see what you should get. If it differs, that is where the real lesson is.
- Read the run.
gh run view,--log,--log-failed– a red run is a message, not a nuisance. - Pass the checkpoint. Only when the check commands show what is written there do you move on.
- Solve the challenge on your own. First the hint, then the solution.
- Lab values stay in the lab.
lab-api-key-123,lab-deploy-token-123and the otherlab-…values are practice data. Your repository is public – real secrets have no place in it.
Warning: All outputs come from real test runs. Times, IDs, commits and run numbers will differ on your machine. What matters is what happens.
Structure of each training day
| Section | Purpose |
|---|---|
| Briefing | The essentials in a few bullet points |
| Drills | Commands and workflows with expected output |
| Checkpoint | Individual check commands: did everything work? |
| Challenge | A task without instructions |
| Enterprise Note | What is different in organizations |
The training plan
| Part | Day | Unit |
|---|---|---|
| 1 – Basics | 0 | The training ground |
| 1 | The first workflow | |
| 2 | Triggers and expressions | |
| 3 | Build, matrix, cache, artifacts | |
| 4 | Lint and rulesets | |
| 2 – Containers and releases | 5 | A runner of your own |
| 6 | Building images and pushing to GHCR | |
| 7 | Releases | |
| 8 | SBOM, scan, signature, provenance | |
| 3 – Security and deployment | 9 | Securing workflows |
| 10 | Environments, OIDC and updates | |
| 11 | Deployment to Kubernetes | |
| 4 – Reuse | 12 | Composite actions and reusable workflows |
| 13 | A JavaScript action of your own | |
| 14 | Runners on Kubernetes with ARC | |
| Competition | 15 | Eight broken workflows |
| Appendix | A | Cheat Sheet |
| B | Final Exam |
The lab
You need a GitHub account. You work over SSH on an Ubuntu 26.04 VM
gha with 2–4 CPUs and 4–8 GB RAM that you start with
Multipass. Any other Linux VM with sudo and internet access
works too. The jobs run on GitHub’s free runners, from Day 5 also on
your VM, from Day 14 in a k3s on it.
The tested versions: GitHub CLI 2.103, runner 2.338, Docker 29.9, Go 1.27, golangci-lint 2.15, k3s 1.37, Helm 4.3, ARC 0.15.1, zizmor 1.32, cosign 3.1. The actions: checkout v7, setup-go v7, upload-artifact v7, download-artifact v8, golangci-lint-action v9, setup-buildx v4, login v4, metadata v6, build-push v7, trivy-action 0.36, sbom-action 0.24, attest v4, cosign-installer v4.
You can find the companion code at
https://github.com/thomaszachmann/github-actions-zum-anfassen;
Day 0 fetches it with git clone. It contains notes-api –
you write the workflows yourself.
Where this book only touches on a topic, the sister books go into depth: “Dockerfiles hands-on” for the Dockerfile of notes-api, “Secure supply chains hands-on” for SBOM and signatures, “Kubernetes hands-on” for the cluster, “Renovate hands-on” for updates at scale.
Let’s go.