This directory contains the GitHub Actions workflows and configuration for the Docqet project.
The main CI/CD pipeline that runs on every push and pull request.
Jobs:
- Quality Checks: Linting, security scanning, and code quality checks
- Testing: Unit tests, integration tests, and coverage reporting
- Security: Vulnerability scanning with Trivy
- Build & Deploy: Docker image building and deployment to AWS
- Staging Deployment: Automatic deployment to staging environment
- Production Deployment: Automatic deployment to production environment
Triggers:
- Push to
mainordevelopbranches - Pull requests to
mainordevelopbranches
Automated repository setup and maintenance.
Tasks:
- Repository configuration (description, topics, features)
- Branch protection setup
- Weekly maintenance tasks
Triggers:
- Manual dispatch
- Weekly schedule (Sundays at 2 AM UTC)
Automated release creation and management.
Tasks:
- Version determination
- Changelog generation
- GitHub release creation
- Slack notifications
Triggers:
- Push of version tags (e.g.,
v1.0.0) - Manual dispatch
Configure these secrets in your GitHub repository settings:
AWS_ACCESS_KEY_ID: AWS access key for deploymentAWS_SECRET_ACCESS_KEY: AWS secret key for deployment
SLACK_WEBHOOK_URL: Slack webhook URL for notifications
DOCKERHUB_USERNAME: Docker Hub usernameDOCKERHUB_TOKEN: Docker Hub access token
- Branch:
develop - Purpose: Pre-production testing
- Auto-deploy: Yes
- Branch:
main - Purpose: Live application
- Auto-deploy: Yes (with approval)
The main branch is protected with:
- Required status checks:
quality-checks,test,security - Required pull request reviews (1 approval minimum)
- Dismiss stale reviews
- Enforce admins
- Bug Report: For reporting bugs and issues
- Feature Request: For suggesting new features
Standardized PR template with checklists and guidelines.
- Create a feature branch from
develop - Make changes and commit
- Push to GitHub
- Create a pull request to
develop - CI/CD pipeline runs automatically
- After approval and merge, staging deployment triggers
- Create and push a version tag:
git tag v1.0.0 && git push origin v1.0.0 - Release automation creates GitHub release
- Production deployment triggers automatically
- Project Setup: Run manually or weekly for repository maintenance
- Release Creation: Run manually to create releases without tags
- Build Failures: Check the logs for dependency or test failures
- Deployment Failures: Verify AWS credentials and permissions
- Security Scan Failures: Review and fix security vulnerabilities
- Test Failures: Ensure all tests pass locally before pushing
- Check workflow logs in the Actions tab
- Verify secret configuration
- Test locally with
make testandmake ci
- Always run tests locally before pushing
- Use conventional commit messages for better changelog generation
- Review security scan results regularly
- Monitor deployment logs for issues
- Keep dependencies updated to avoid security vulnerabilities