Create a GitHub Actions CI/CD Workflow
Generate a complete GitHub Actions workflow for CI, CD, or automation with proper job structure and secrets handling.
The Prompt
Create a GitHub Actions workflow YAML file for the following pipeline. Include: 1. Trigger conditions (push, pull_request, schedule, manual) 2. Job dependencies and parallelism 3. Caching for dependencies 4. Environment secrets handling 5. Conditional steps (e.g., only deploy on main) 6. Status notifications or summary output Pipeline description: [DESCRIBE YOUR PIPELINE — e.g., On push to any branch: install deps, lint, run tests. On merge to main: build Docker image, push to ECR, deploy to ECS staging. On tag v*: deploy to production with manual approval.] Stack: [NODE/PYTHON/GO — specify] Cloud provider: [AWS/GCP/AZURE/VERCEL — if deploying]
Example Output
Created a 3-job workflow: test (runs on all PRs with npm cache and parallel jest shards), build (runs on main, builds and pushes to ECR with OIDC auth instead of long-lived keys), and deploy (requires manual approval for production).
FAQ
Which AI model is best for Create a GitHub Actions CI/CD Workflow?
GPT-4o or Claude Sonnet 4. Both have strong knowledge of GitHub Actions syntax.
How do I use the Create a GitHub Actions CI/CD Workflow prompt?
Copy the prompt, replace the [BRACKETED] placeholders with your specific information, and paste into your preferred AI assistant (ChatGPT, Claude, Gemini, etc.). Created a 3-job workflow: test (runs on all PRs with npm cache and parallel jest shards), build (runs on main, builds and pushes to ECR with OIDC auth instead of long-lived keys), and deploy (requires manual approval for production).
Model Recommendation
GPT-4o or Claude Sonnet 4. Both have strong knowledge of GitHub Actions syntax.