CI/CD pipeline with GitHub Actions
Lint and test every push, then build and publish a Docker image to GHCR from main.
You'll end with: A real pipeline and a published container image on your GitHub profile.
Do it here, in your browser
Follow the steps on the left and type in the terminal on the right. Each step ticks itself off when your files are right. At the end, one button creates the repository in your GitHub with your work, and you get a ready LinkedIn post.
Or do it on your own computer
Prefer a real terminal? Make your copy from our GitHub template, work in Codespaces or on your machine, then submit the link below.
akopslabs/build-cicd-pipelineSteps on your own computer
- 1
Make your copy
Press Start this project, keep it Public, and create it. The app, tests and Dockerfile are ready.
- 2
Write the pipeline
Create .github/workflows/ci.yml named CI. A test job runs npm run lint and npm test on Node 20. A build job needs test, runs only on main, has packages: write, logs in to ghcr.io and pushes the image tagged with the commit SHA.
- 3
Use the official actions
These do the heavy lifting.
actions/checkout@v4 actions/setup-node@v4 docker/login-action@v3 docker/build-push-action@v6
- 4
Push to main
Push and watch the Actions tab: CI runs first, then AkOps check. Your image appears under Packages on your profile.
- 5
Submit and share
Paste your repository link below and press Check my project.