GitHub Actions CI/CD Workflow Generator
devops
YAML
scaffolding
strict_senior
Generate production-ready GitHub Actions workflows with matrix builds, caching, testing, and deployment strategies.
By ethan_w
12/8/2025
Prompt
Generate a GitHub Actions CI/CD workflow for the following project:
Project Information
- Project Type: [Node.js app / Python app / Go app / Docker app / Mobile app / Multi-language monorepo]
- Repository: [Public / Private]
- Primary Branch: [main / master / develop / custom]
- Team Size: [Solo / Small team / Large organization]
CI/CD Requirements
Select required stages:
Continuous Integration
- Linting: [ESLint / Prettier / Ruff / golangci-lint / Custom / None]
- Type Checking: [TypeScript / mypy / Flow / None]
- Unit Tests: [Jest / Vitest / pytest / Go test / PHPUnit / Custom]
- Integration Tests: [Playwright / Cypress / Selenium / Postman / None]
- Code Coverage: [Required with minimum: X% / Optional / None]
- Security Scanning: [CodeQL / Snyk / Trivy / SonarCloud / None]
Build Process
- Build Required: [Yes / No]
- Build Command: [npm run build / go build / docker build / gradle build / Custom]
- Build Artifacts: [dist/ / build/ / target/ / Custom path]
- Artifact Retention: [Keep for X days / Permanent / Not needed]
Test Matrix
- Matrix Testing: [Required / Not needed]
- Operating Systems: [ubuntu-latest / macos-latest / windows-latest / Multiple]
- Runtime Versions: [Node: 18, 20, 21 / Python: 3.9, 3.10, 3.11 / Go: 1.21, 1.22 / Custom]
- Exclusions: [Specify any OS/version combinations to exclude]
- Fail Fast: [Yes / No - continue all matrix jobs even if one fails]
Deployment Strategy
Define deployment stages:
Staging Deployment
- Trigger: [On push to main / On PR merge / Manual / Tag]
- Target: [Vercel / Netlify / AWS / Azure / GCP / Heroku / Custom]
- Environment Name: [staging / preview / dev]
- Environment URL: [Provide URL or pattern]
- Approval Required: [Yes / No]
- Deploy Command: [Specify command]
Production Deployment
- Trigger: [After staging success / On tag / Manual approval / Schedule]
- Target: [Same as staging / Different: specify]
- Environment Name: [production / prod]
- Environment URL: [Provide URL]
- Approval Required: [Yes - require review / No]
- Deploy Command: [Specify command]
- Rollback Strategy: [Automatic on failure / Manual / None]
Workflow Triggers
Select triggers for your workflow:
Push Triggers
- Branches: [main, develop, release/* / All / Specific: list]
- Path Filters: [Only run if files in: src/**, package.json / All files / Custom]
- Ignore Paths: [docs/, *.md / None]
Pull Request Triggers
- Target Branches: [main / Any / Specific: list]
- PR Types: [opened, synchronize, reopened / All / Custom]
Manual Triggers
- Workflow Dispatch: [Enable manual runs / No]
- Inputs: [Environment choice / Version tag / Custom inputs / None]
Schedule
- Cron Schedule: [Daily / Weekly / Custom cron / None]
Caching Strategy
- Dependency Cache: [npm / pip / cargo / go / gradle / Multiple]
- Build Cache: [Vite / Next.js / Webpack / Docker layers / None]
- Cache Key Strategy: [Hash of lock files / Branch-based / Custom]
Docker Integration
If Docker is involved:
Docker Build
- Build Docker Image: [Yes / No]
- Dockerfile Location: [./Dockerfile / Custom path]
- Build Context: [. / ./backend / Custom]
- Target Stage: [production / All stages / Custom]
Docker Registry
- Registry: [Docker Hub / GitHub Container Registry / AWS ECR / Google GCR / Azure ACR / Custom]
- Image Name: [username/repo / org/app / Custom]
- Tagging Strategy: [latest + git SHA / Semantic version / Branch name / Custom]
- Multi-platform Build: [linux/amd64, linux/arm64 / Single platform]
Secrets and Environment Variables
List required secrets and environment variables:
Secrets Needed
- [e.g., DEPLOY_TOKEN, NPM_TOKEN, DOCKER_PASSWORD, AWS_ACCESS_KEY_ID]
Environment Variables
- [e.g., NODE_ENV, API_URL, DATABASE_URL]
Advanced Features
Select additional features:
Reusable Workflows
- Create Reusable Workflow: [Yes for: [test / build / deploy] / No]
- Workflow Inputs: [Specify inputs: version, environment, etc.]
- Workflow Secrets: [List secrets to pass]
Conditional Execution
- Skip CI: [Respect [skip ci] in commit message / Always run]
- Branch-Specific Jobs: [Different jobs per branch / Same for all]
- Conditional Steps: [Deploy only if tests pass / Custom conditions]
Notifications
- Slack Notifications: [On failure / On success / Both / None]
- Email Notifications: [On failure / None]
- GitHub Status Checks: [Required / Optional]
Performance Optimization
- Parallel Jobs: [Run tests and builds in parallel / Sequential]
- Job Dependencies: [Define job order with needs: / Independent]
- Concurrency Control: [Cancel in-progress runs on new push / Allow multiple]
Artifact Management
- Build Artifacts: [Upload dist/ build/ / Not needed]
- Test Reports: [Upload test results / Coverage reports / None]
- Artifact Usage: [Download in deploy job / External use / None]
Compliance and Reporting
- License Checking: [Yes / No]
- Dependency Scanning: [Dependabot / Snyk / None]
- SBOM Generation: [Yes / No]
- Compliance Checks: [SAST / DAST / Container scanning / None]
Monitoring and Observability
- Performance Monitoring: [Lighthouse CI / Bundle size tracking / None]
- Deployment Tracking: [Tag releases / Create GitHub releases / None]
- Metrics: [Track build times / Deployment frequency / None]
Generate a complete GitHub Actions workflow with:
- Main workflow file (.github/workflows/ci-cd.yml)
- All necessary jobs: lint, test, build, deploy
- Matrix builds if required
- Proper caching configuration
- Secret management
- Conditional execution
- Environment deployments with protection rules
- Artifact upload/download
- Docker build and push (if required)
- Reusable workflow files (if requested)
- Status checks and notifications
- Comprehensive comments explaining each section
Output production-ready YAML workflow files following GitHub Actions best practices with proper error handling, security, and optimization.
Tags
github-actions
ci-cd
automation
deployment
Tested Models
gpt-4
claude-3-opus