GitHub Actions Workflow Builder
Added Apr 2, 2026
About This Prompt
This prompt generates complete, production-grade GitHub Actions CI/CD workflows with proper caching, matrix testing, deployment gates, and notification setup. It goes beyond basic build-and-test by implementing real-world requirements like concurrency controls, environment-specific secrets, branch protection recommendations, and rollback procedures. The output is a drop-in YAML file with comprehensive comments that make the workflow maintainable by the entire team. It is ideal for development teams setting up CI/CD for new projects, migrating from other CI systems like Jenkins or CircleCI, or optimizing slow existing workflows with better caching and parallelization strategies.
Variables to Customize
[PROJECT_STACK]
Your project's technology stack and package manager
Example: Next.js 15 with TypeScript, pnpm, Prisma ORM, PostgreSQL, deployed as Docker container
[WORKFLOW_TRIGGERS]
When the workflow should run and your branching strategy
Example: Run CI on all PRs to main. Deploy to staging on merge to main. Deploy to production on release tags (v*). Manual trigger for hotfixes.
[BUILD_TEST_REQUIREMENTS]
What needs to happen during CI and build
Example: ESLint + Prettier check, TypeScript compilation, Jest unit tests (95% coverage threshold), Playwright E2E tests against a test database, Docker image build
[DEPLOYMENT_TARGET]
Where and how the application deploys
Example: AWS ECS Fargate with ECR for Docker images. Staging auto-deploys, production requires manual approval. Use AWS OIDC for credentials, no long-lived access keys.
Tips for Best Results
- Include your current CI run time and target so the optimization suggestions are calibrated appropriately
- Mention any monorepo or workspace setup since this affects path filtering and job dependencies
- Specify if you use any infrastructure-as-code tools like Terraform since they often need their own workflow jobs
Example Output
```yaml
name: CI/CD Pipeline
on:
push:
branches: [main]
pull_request:
branches: [main]
release:
types: [published]
workflow_dispatch:
inputs:
environment:
description: 'Deploy target'
required: true
type: choice
options: [staging, production]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
lint-and-typecheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
- uses: actions/setup-node@v4
with:
node-version: 22
cache: 'pnpm'
# Lint and type check run in parallel...
```