Portfolio · Case study · DevOps & automation
From commit to production, automatically, with tests guarding every merge.
We designed a GitHub Actions CI/CD pipeline that builds, tests and deploys a containerised application. Nothing reaches the main branch without passing the full test suite, and every approved change ships through the same repeatable release flow.
- Client
- Software product company
- Service
- CI/CD design & implementation
- Platform
- GitHub Actions · Docker
- Timeline
- 6 months
The challenge
Manual releases were slow and risky.
Builds ran on individual laptops, tests were run inconsistently, and deployments depended on a checklist and one or two people who knew the steps. Broken code could reach the main branch, and every release carried the risk of a late-night rollback.
The team needed a single, trustworthy path from pull request to production, one that caught problems early and made shipping routine.
Our solution
One automated release flow, gated by tests.
- Branch protection: merges to main require a green pipeline and a code review.
- Build once, deploy many: a single Docker image, tagged by commit, moves from staging to production unchanged.
- Layered testing: lint, unit, integration and container security scans run in parallel.
- Safe production releases: a manual approval step, health checks and one-click rollback.
How it works
The release flow, stage by stage
Every push triggers the pipeline. If any stage fails, the flow stops, the pull request is blocked and the developer is notified, so only verified code moves forward.
- 01 · Trigger
Push / PR
A commit or pull request starts the workflow.
- 02 · Build
Container image
Docker builds the app with cached layers for speed.
- 03 · Test gate
Lint · Unit · Integration
Must pass before a merge is allowed.
- 04 · Scan & push
Registry
Image is scanned, tagged by commit SHA and pushed.
- 05 · Staging
Auto-deploy
Merged code deploys to staging with smoke tests.
- 06 · Production
Approve & release
One approval promotes the same image to production.
Merge gate: blocks the PR on failure Protected environment: requires approval
Defined as code, versioned with the app
The whole pipeline lives in a single workflow file inside the repository. Changes to the release process are reviewed like any other code, and every run is logged and auditable in GitHub.
Secrets such as registry credentials and cloud keys are stored in GitHub’s encrypted secrets and scoped to each environment, so production keys are only available after approval.
on:
push:
branches: [main]
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: docker build -t app:test .
- run: docker run app:test npm test
build-and-push:
needs: test # tests gate everything
if: github.ref == 'refs/heads/main'
steps:
- run: docker push ghcr.io/org/app:${{ github.sha }}
deploy-production:
needs: build-and-push
environment: production # manual approval
steps:
- run: ./deploy.sh ${{ github.sha }}Tech stack
Tools we used
CI/CD
GitHub Actions, reusable workflows, environments and required checks
Containers
Docker, multi-stage builds, GitHub Container Registry
Testing & quality
Unit and integration tests, linting, code coverage reports
Security
Container image scanning, encrypted secrets, scoped permissions
Hosting
AWS with Kubernetes for container orchestration
Visibility
Status badges, Slack and email alerts on failure, run history
Outcomes
What changed for the team
from merge to production, down from 1–2 days
of merges to main pass the full test suite first
more frequent releases each week
rollback to any previous image
“Releasing used to be a half-day event we dreaded. Now every change is tested automatically and goes live in minutes. Our team ships several times a week without worrying about breaking production.”
Ready to ship with confidence?
We build CI/CD pipelines that fit your stack, your cloud and your team.