CI/CD Pipeline for Ghaymah
Overview
This GitHub Actions workflow automates the CI/CD process for the Ghaymah application. It builds a Docker image, pushes it to the Ghaymah Container Registry, and requires manual approval before deploying to the production environment.
Workflow Steps
- Trigger the workflow on every push to the
mainbranch. - Checkout the source code.
- Build the Docker image.
- Login to the Ghaymah Container Registry using GitHub Secrets.
- Push the Docker image to the registry.
- Wait for manual approval before deploying to the production environment.
- Deploy the application to production.
Manual Approval
The deployment job uses the production GitHub Environment.
environment:
name: production
This pauses the workflow until an authorized reviewer approves the deployment.
GitHub Secrets
The workflow expects the following secrets:
- GHAYMAH_REGISTRY
- GHAYMAH_USERNAME
- GHAYMAH_TOKEN
These secrets securely store the registry URL and authentication credentials without exposing sensitive information in the workflow file.
Difference Between Staging and Production
| Staging | Production |
|---|---|
| Used for testing before release. | Used by real users. |
| Developers and QA teams validate new features. | End users access the application. |
| Bugs can be found and fixed safely. | Stability and availability are the highest priority. |
| New changes are tested first. | Only approved and tested changes are deployed. |
Deployment Flow
Developer Push
↓
Build Docker Image
↓
Push to Ghaymah Container Registry
↓
Deploy to Staging
↓
Testing & Validation
↓
Manual Approval
↓
Deploy to Production
This deployment strategy ensures that every production release is reviewed and approved before it reaches end users.