Skip to content

Latest commit

 

History

History
49 lines (33 loc) · 2.45 KB

06-ci.en.md

File metadata and controls

49 lines (33 loc) · 2.45 KB

STEP6: Build Docker image using CI

In this step you will learn how to use CI.

📖 Reference

1. About CI

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.

2. Enable GitHub Actions

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. Enable workflow

3. Build the application with GitHub Actions and upload the docker image to the registry

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


Next

STEP7: Implement a simple Mercari webapp as frontend