Setting up CI/CD Using GitHub Actions

Amr Saleh
Javarevisited
Published in
3 min readJul 4, 2020

--

Photo by Richy Great on Unsplash

GitHub Action is a task you want to achieve at a certain event.

For example, on Push to a master event, you want to build, run tests, create a docker image, push to docker hub, and deploy to Kubernetes.

Build, run, create, push, and deploy are all GitHub Actions.

GitHub has a repository in which you can find an action for pretty much any task you want to achieve, check it out.

You can also write a custom action but this is out of the scope of this tutorial.

Prerequisites

We will be deploying out sample application on google cloud platform Kubernetes using Helm3.

It is highly recommended to familiarize yourself with the following topics:

  1. Kubernetes.
  2. Helm.

Defining the use case

We will write a sample application using spring boot (it doesn’t really matter) and we will run the following workflows:

  1. On push to Feature branch
Run tests

2. On push to Master branch

Run tests -> Push to docker hub -> Deploy to K8s

--

--

Amr Saleh
Javarevisited

I’m a software engineer who is passionate about software architecture and design. Enjoy coding in Java, Scala, and JavaScript.