In this step you will learn how to use CI.
📖 Reference
-
(JA)継続的インテグレーションについて
-
(JA)Udemy Business - 【新UI対応】Amazon ECS × GitHub Actionsで始めるコンテナベースのアプリケーション開発
- You can ignore the lectures about Amazon ECS
-
(EN)Udemy Business - The Complete GitHub Actions & Workflows Guide
CI is an abbreviation for Continuous Integration. A process that automatically builds, tests, and more every time you push or merge code. There are many people who do not have the opportunity to use CI if they are developing alone.
First learn more about CI by looking into the Reference and Udemy page.
GitHub offers a CI service called GitHub Actions. First, enable GitHub Actions on your repository.
After enabling Workflow, create an commit and confirm that the GitHub Actions Workflow works, by pushing to the repository as a trigger. The workflow works if ✅ or 🔴 is displayed next to the commit comment as shown in the figure below.
The file .github/workflows/build.yml
already contains a workflow that pushes your code to the registry,
# - name: Build and push Docker image
Remove the comment out from the Step and push the docker image via CI.
If the Workflow is successful, the generated image will be pushed to the URL: ghcr.io/<github-id>/mercari-build-training:<branch-name>
.
Pull the image locally and run it.
Reference