Automate your build, test, and deploy pipelines using GitHub Actions!
Continuous delivery (CI/CD) pipelines help you automate the software development process and maximize your team’s efficiency. GitHub Actions in Action teaches you to build real-world build, test, and deploy pipelines in GitHub Actions through hands-on labs and projects.
In GitHub Actions in Action you will learn how
• Create and share GitHub Actions workflows • Automate CI/CD workloads and other GitHub tasks • Secure release pipelines with secrets, variables, and environments • Support compliance frameworks • Create safe and scalable self-hosted runners
Written by three Microsoft MVPs and tech reviewed by a Staff DevOps Architect from GitHub, this book delivers the hardworking skills and advice you’ll need to be successful on the job. DevOps engineers will love GitHub Actions in Action’s coverage of reliable methods for Infrastructure-as-Code and automating cloud environments. You’ll follow an extended example application for selling tickets, taking it all the way from initial build to cloud deployment.
Foreword by Scott Hanselman.
About the technology
Believe it or not, CI/CD can be simple! With GitHub Actions, you can automate your entire dev process using just the tools built into GitHub—no external frameworks or complex integrations required. GitHub Actions is secure, reliable, and best of all, easy. This book will get you started.
About the book
GitHub Actions in Action teaches you how to build automated delivery pipelines in GitHub. You’ll start with simple examples that demonstrate workflow and action basics, and then you’ll dive into platform architecture, security, and workflow runtime details. As you go, you’ll build a full CI/CD pipeline, optimizing for compliance, performance, and costs. You’ll even create shareable actions for the GitHub marketplace.
What's inside
• Create and share GitHub Actions workflows • Automate testing and other GitHub tasks • Secure release pipelines with secrets, variables, and environments
About the reader
For developers and DevOps engineers comfortable with GitHub.
About the author
Michael Kaufmann is a Microsoft Regional Director and MVP. Rob Bos is an Azure and GitHub Trainer, a Microsoft MVP, a GitHub Star, and a LinkedIn Learning Instructor. Marcel de Vries is a CTO of Xebia Microsoft Services, Microsoft Regional Director, and MVP.
The technical editor on this book was James Michael Gousset.
Table of Contents
Part 1 1 Introduction to GitHub Actions 2 My first Actions workflow 3 Workflows 4 GitHub Actions Part 2 5 Runners 6 Self-hosted runners 7 Managing your self-hosted runners Part 3 8 Continuous integration 9 Continuous delivery 10 Security 11 Compliance 12 Improving workflow performance and costs
I put code on GitHub. GitHub Actions make it possible to have some form of CI/CD to do some post-processing every time I commit changes. I was hoping this book would help me grok all that I can do using GitHub Actions.
GitHub Actions has extensive documentation. So why buy a book about it when all this documentation is available for free? I usually have a hard time following online documentation. It is fine if you want to zero in on something and get exhaustive information about it. But if you don't know what you need to look for, it can be frustrating. A book provides better context and a more cohesive learning experience.
As much as I want the book to cover and explain all the pieces, I realize as GitHub Actions releases new features, the book will become more and more out-of-date. They have to balance being useful here and now versus still being relevant years later. There are links to the online documentation; I hope these links stay alive for a long time. The authors often provide a cursory look at a given concept and follow it with a "for more, look up this link." This can get annoying when they've just introduced something that interests me, and I'm looking forward to how I can apply it in my projects, only to be thrown back to the documentation.
The book does a good job walking the reader through small example workflows that get you familiar with the tools: the workflow designer, the marketplace, the reporting in the GitHub UI. But these example workflows and actions are too trivial to teach you anything about building real, useful ones. "Hello World" can only get you so far. It would be nice to follow the "Hello World" examples with a more fleshed out example that does some of the things people want to do in their CI. Compile some code and publish the resulting artifacts. They mention that actions can publish to package managers, but at least one fleshed out example would have been better. One example for each of the major stacks would be better. One example for Java with Gradle, Ruby on Rails, and Node would have been best for me. There are three authors, surely they have some bandwidth.
WebStorm has decent support for GitHub workflows. The book also mentions VS Code. The online workflow designer on github.com is pretty good, too, but can only edit one file at a time. It does have the marketplace right there in the UI, which is very handy.
I can write GitHub actions as Docker images that run on runners. Maybe I can use a Docker image of Dependency Finder to create multiple actions that match what's offered by the Ant tasks. A repo could use GitHub actions to build its software, and then run either JarJarDiff or OOMetrics to generate reports.
The one large-ish deployment example heavily relies on Kubernetes in Azure Cloud. They use existing actions to interact with Kubernetes, which hides some of the complexity. There is an example step that calls kubectl and uses the output to set an environment variable, or call dotnet commands to run end-to-end tests and write the results to the workflow summary. An additional, non-container example would have been helpful, too.
The section on OIDC finally showed some breath by showing the same authentication flow across Azure, AWS, and GCP. But these flows would just authenticate and then echo something to demonstrate they had access. Instead, it would have been useful to do some real deployment work instead and make the example a little deeper.
Great book to get started with GitHub Actions. This book delivered what I expected from it: a well-written manual, with a more fluent reading than the official documentation, with practical examples using third-party tools that could not be featured in the official pages.