A production-grade CI/CD pipeline demonstration built with Spring Boot, GitHub Actions, and Docker. This project showcases a complete automated delivery pipeline from code commit to deployment — the kind of pipeline I design and implement for clients.
Developer Push
│
▼
┌─────────────────────────────────────────────────────┐
│ GitHub Actions │
│ │
│ ┌──────────┐ ┌─────────────┐ ┌────────────┐ │
│ │ JUnit │───▶│ Build JAR │───▶│ Docker │ │
│ │ Tests │ │ (Maven) │ │ Build+Push │ │
│ └──────────┘ └─────────────┘ └─────┬──────┘ │
│ │ │
│ ┌────────────────┴──────┐ │
│ ▼ ▼ │
│ ┌─────────────┐ ┌──────────────┐│
│ │ Staging │ │ Production ││
│ │ (develop) │ │ (main) ││
│ └─────────────┘ └──────────────┘│
└─────────────────────────────────────────────────────┘
| Stage | Trigger | What it Does |
|---|---|---|
| Test | Every push & PR | Compiles, runs JUnit tests, generates reports |
| Code Quality | After tests pass | OWASP dependency vulnerability scan |
| Build & Push | Push to main/develop |
Builds JAR, creates multi-arch Docker image, pushes to Docker Hub |
| Deploy Staging | Push to develop |
SSH deploy to staging server, health check |
| Deploy Production | Push to main |
Zero-downtime deploy, health check, GitHub Release created |
- Application: Java 17 + Spring Boot 3.2 + Maven
- CI/CD: GitHub Actions
- Containerisation: Docker (multi-stage build, multi-arch)
- Security: OWASP Dependency Check
- Deployment: SSH-based rolling deploy with health checks
githubActionAutomation/
├── .github/
│ └── workflows/
│ └── ci-cd.yml # Full pipeline definition
├── src/
│ ├── main/java/com/devops/demo/
│ │ ├── DemoApplication.java
│ │ ├── controller/
│ │ │ └── HealthController.java
│ │ └── service/
│ │ └── HealthService.java
│ ├── main/resources/
│ │ └── application.properties
│ └── test/java/com/devops/demo/
│ └── DemoApplicationTests.java
├── Dockerfile # Multi-stage optimised image
├── docker-compose.yml # Local dev environment
├── pom.xml
└── README.md
git clone https://github.com/Rashmik3/githubActionAutomation.git
cd githubActionAutomation
mvn spring-boot:rundocker build -t devops-cicd-demo .
docker run -p 8080:8080 devops-cicd-demodocker-compose up --build# Health check
curl http://localhost:8080/api/health
# App info
curl http://localhost:8080/api/info
# Spring Actuator
curl http://localhost:8080/actuator/healthGo to your repo → Settings → Secrets and variables → Actions and add:
| Secret | Description |
|---|---|
DOCKERHUB_USERNAME |
Your Docker Hub username |
DOCKERHUB_TOKEN |
Docker Hub access token |
STAGING_HOST |
Staging server IP or hostname |
STAGING_USER |
SSH username for staging |
STAGING_SSH_KEY |
Private SSH key for staging |
PROD_HOST |
Production server IP or hostname |
PROD_USER |
SSH username for production |
PROD_SSH_KEY |
Private SSH key for production |
- Automated build, test, and quality gate on every commit
- Multi-stage Docker builds for minimal production image size
- Multi-architecture images (amd64 + arm64)
- Environment-based deployment (staging on
develop, production onmain) - SSH-based deployment with health check validation
- GitHub Release auto-created on every production deploy
- Test reporting with JUnit XML artifacts
- Dependency caching for faster builds
Kumari Rashmi — DevOps Engineer
Freelancer.de Profile · LinkedIn · GitHub