Member-only story

Docker Deployments With GitHub Actions

Manage Docker Swarm and Docker Compose deployments with GitHub Actions

Al-Waleed Shihadeh
Better Programming
5 min readAug 21, 2020

Photo by Chris Sabor on Unsplash

There are plenty of continuous integration and delivery tools that can be used to run CI/CD pipelines, such as Jenkins, Travis CI, and CircleCI. When it comes to projects hosted on GitHub, there is another native option available, which is GitHub workflows.

GitHub workflows can be used to achieve several goals, such as building Docker images, running unit tests, and even deploying to a remote server. The workflows can be triggered by GitHub events as well as external events. For instance, it is possible to create a workflow that will be executed once you create a new release on the repository. In addition, the same workflow can be configured to be triggered by an external API call.

Because GitHub workflows can be triggered using native GitHub events and without defining webhooks, it is a much easier tool to use and define than other tools and options.

GitHub workflows are defined in YAML format files that describe which actions or steps need to be executed during the workflow. You can find more about the internals of GitHub workflows and GitHub actions in the article “Build GitHub Actions Using Docker Containers”.

Responses (1)

Write a response

Kudos for the cool workflow. Just a comment... as exposing the Docker API publicly doesn't seem to be a good idea, I think the API option applies for cases when you have a remote runner(s) allowed to reach your docker hosts using API. Is my understanding correct?

Recommended from Medium

Lists

See more recommendations