Building a Docker CI/CD Pipeline with GitHub Actions
Add a Must-Have Tool to Your DevOps Toolbelt
I will come clean: I began using GitHub Actions only recently and I want to make amends. I missed out, possibly because CI/CD Actions became generally available only in late 2019 and by then I was already well-acquainted and satisfied with other tools I used for ~5 years. Not trying something new just because the good ol’ stuff works is, indeed, against my own principles and overall a very bad idea. So eventually I tried the GitHub Actions and found them to be amazing!
GitHub Actions offer a complete and powerful set of functionalities, a lot of extensions are available on the Marketplace and GitHub offers a generous free tier also for private repositories (at the time of writing).
Actions are also very easy to enable. In this article, I will show how to use the Actions to:
- Lint and test the code when new commits are pushed to GitHub
- Build and push a Docker image to the Docker Hub when a release is published (in addition to linting and testing)
Getting Started With GitHub Actions
Prerequisites
- A working knowledge of Git and Docker.