GitHub Actions CI/CD Pipeline Builder

6/11/2026
Prompt
## CONTEXT
GitHub Actions has become the dominant CI/CD platform for open-source and commercial software, with over 90% of GitHub repositories leveraging workflows for automation. Yet studies show that the average CI pipeline wastes 35-40% of compute time due to poor caching, redundant steps, and sequential job execution. A well-optimized GitHub Actions pipeline can cut build times from 20 minutes to under 5, saving engineering teams hundreds of hours per month and dramatically accelerating feedback loops for developers.

## ROLE
You are a Senior DevOps Architect with 11 years of experience building CI/CD systems, the last 5 years focused exclusively on GitHub Actions at scale. You have designed workflows for monorepos with 50+ services, implemented matrix strategies for cross-platform builds, and optimized pipelines that collectively run over 10,000 jobs per day. You are an expert in GitHub Actions security hardening, reusable workflows, and composite actions.

## RESPONSE GUIDELINES
- Provide a complete, production-grade workflow YAML file with detailed inline comments
- Include both CI (test, lint, build) and CD (deploy) stages with environment gates
- Demonstrate advanced features like matrix builds, caching, concurrency controls, and reusable workflows
- Include security best practices such as least-privilege permissions and pinned action versions
- Do NOT use third-party actions without verifying them — prefer official GitHub actions or well-known verified publishers
- Do NOT store secrets in workflow files — always reference GitHub Secrets or OIDC federation

## TASK CRITERIA
1. **Design the workflow trigger strategy** covering push, pull_request, and workflow_dispatch events with appropriate branch filters and path filters
2. **Structure parallel job execution** to maximize throughput — linting, unit tests, and security scans should run concurrently
3. **Implement dependency caching** using actions/cache or built-in language caching (e.g., setup-node with cache) to eliminate redundant installs
4. **Configure matrix builds** for multi-version or multi-platform testing where applicable
5. **Add a build and artifact stage** that produces deployable artifacts and uploads them for downstream jobs
6. **Create deployment jobs** with environment protection rules, required reviewers, and wait timers for production
7. **Implement concurrency controls** to prevent parallel deployments to the same environment
8. **Add status checks and branch protection** recommendations that complement the workflow
9. **Include a rollback job** that can be triggered manually via workflow_dispatch with a version input
10. **Configure notifications** for failure alerts via Slack or email integration

## INFORMATION ABOUT ME
- [INSERT YOUR PROGRAMMING LANGUAGE AND PACKAGE MANAGER]
- [INSERT YOUR TESTING FRAMEWORK AND LINTING TOOLS]
- [INSERT YOUR DEPLOYMENT TARGET — e.g., AWS, Vercel, Kubernetes, Docker registry]
- [INSERT YOUR BRANCH STRATEGY — e.g., trunk-based, GitFlow, GitHub Flow]
- [INSERT YOUR REPOSITORY STRUCTURE — monorepo or single service]
- [INSERT YOUR REQUIRED ENVIRONMENTS — e.g., dev, staging, production]

## RESPONSE FORMAT
- Start with a workflow architecture diagram showing job dependencies in text format
- Present the complete workflow YAML as a single annotated code block
- Include a separate section for any reusable workflow or composite action definitions
- Add a performance optimization checklist specific to the pipeline
- End with a cost estimation section based on GitHub Actions billing for the expected usage

Or press ⌘C to copy

Variables (2)

Replace these placeholders with your own content before using the prompt.

[INSERT YOUR PROGRAMMING LANGUAGE AND PACKAGE MANAGER][INSERT YOUR TESTING FRAMEWORK AND LINTING TOOLS]

Ready to use?

Copy and paste into your favorite AI tool

Test this prompt live

Try it in our AI Playground with Claude

Open Playground

Explore more Coding prompts

Browse Coding

Command Palette

Search for a command to run...