GitHub Actions
Learn GitHub Actions and how to work with Docker in GitHub Actions.
A modern application isn’t complete without a proper CI/CD process in place. CI/CD involves taking code from a code repository, automatically building artifacts, and testing against it to ensure the software is ready to deliver to another environment. In this lesson, we’ll learn to work with Docker in various CI environments.
Working with Docker in CI is no different than working in a local environment. Most commands that we use on our local machine will be applicable in the CI environment. In the local environment, we write code, build, run, and test. Similarly, in the CI environment, we build our code, run tests, push artifacts to the code artifacts repository, and deploy.
Actions
GitHub Actions is GitHub’s owned CI/CD and is well-integrated with GitHub.
GitHub Actions allows us to create workflows that can be used to build or compile, test, and deploy our code within our repository.
GitHub Actions is based on some key concepts that are important for us to know so that we can understand how everything ties together.
Events
In GitHub Actions, everything starts with an event. An event is an action or activity that triggers a workflow. It could be a commit action, a pull request action, a merge action, a comment action, and so on.
Workflow
An event triggers something called a workflow. We can think of workflow as automated instructions that we have configured. It’s a combination of one or more jobs. A workflow to build a Docker image for an application could begin from building the application, running unit ...