Github Actions logo and Docker logo
Github Actions logo and Docker logo
Github Action + Docker = ❤

With Github Actions’ arrival in 2018, more and more projects adopt it as a full-blown CI/CD solution for their projects. This article will see how we can leverage Github Actions to build and publish a Docker Image to Github Container registry or your private Registry.

In this article, I will:

  • Give you a basic introduction to Github Actions.
  • Show you how to make an action that builds our docker image.
  • Show you how to push a docker image to our Github repository.

Pre-requisites

Before we start, we need a repository with a working Dockerfile (since we assume that you have a working Dockerfile). If you don’t have that, I have created a reference and published it to Github that you are free to copy or fork at andersro93/docker-static-demo. …

Anders Refsdal Olsen

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store