This directory contains example cigen.yml configurations demonstrating different use cases and complexity levels.
Pick the example that matches your needs:
Perfect if you want to:
- Get started with zero boilerplate
- See convention-over-configuration in action
- Generate a simple test workflow
Complexity: ⭐☆☆☆☆ Time to implement: 2 minutes Lines of config: 5
Perfect if you have:
- Multiple languages (Ruby + Node.js)
- Database and cache services
- Matrix builds across versions
- Docker builds and deployments
- Complex skip logic
Complexity: ⭐⭐⭐⭐☆ Time to implement: 15 minutes Lines of config: ~100 (vs. ~300 with manual YAML)
Perfect if you have:
- Turborepo-style or large pnpm workspace
- 10+ apps/libraries
- Need selective job execution
- Want 10x faster CI
Complexity: ⭐⭐⭐☆☆ Time to implement: 20 minutes Lines of config: ~50
Perfect if you want to:
- Generate configs for multiple CI platforms
- Migrate between providers easily
- Use different providers for different workflows
- Avoid vendor lock-in
Complexity: ⭐⭐⭐⭐☆ Time to implement: 10 minutes Lines of config: ~60
| Feature | Minimal | Rails App | Monorepo | Multi-Provider |
|---|---|---|---|---|
| Single language | ✅ | ❌ | ❌ | ✅ |
| Multiple languages | ❌ | ✅ | ✅ | ✅ |
| Services (DB, Redis) | ❌ | ✅ | ✅ | ✅ |
| Matrix builds | ❌ | ✅ | ✅ | ❌ |
| Skip logic | ✅ (auto) | ✅ | ✅ (advanced) | ✅ |
| Docker builds | ❌ | ✅ | ❌ | ✅ |
| Deployments | ❌ | ✅ | ✅ | ❌ |
| Multiple providers | ❌ | ❌ | ❌ | ✅ |
# This minimal config:
jobs:
test:
packages:
- ruby
# Auto-generates:
# ✅ Checkout step
# ✅ Ruby setup with version detection
# ✅ Bundle install
# ✅ Gem caching with Gemfile.lock key
# ✅ Skip logic for unchanged filesmatrix:
ruby:
- '3.2'
- '3.3'
arch:
- amd64
- arm64
# Generates 4 jobs automaticallyskip_if:
paths_unmodified:
- app/**
- spec/**
# If no files in these paths changed:
# ✅ Skip job entirely (not just cache hit)
# ✅ Save CI time and cost
# ✅ Works across all providerssteps:
- uses: docker/build@>=1.1
with:
push: false
tags: myapp:latest
# Reusable, versioned modules
# Like GitHub Actions, but provider-agnosticproviders:
- github
- circleci
- buildkite
# One config → three outputs
# ✅ No vendor lock-in
# ✅ Easy migration
# ✅ Use cheapest provider per workflowjobs:
test:
packages:
- ruby
steps:
- run: bundle exec rspecjobs:
test:
packages:
- ruby
services:
- postgres:15
env:
DATABASE_URL: postgres://postgres@localhost/test
steps:
- run: bundle exec rake db:schema:load
- run: bundle exec rspecjobs:
test:
packages:
- ruby
steps:
- run: bundle exec rspec
# Caching is automatic!
# But you can customize:
caches:
bundler:
paths:
- vendor/bundle
key_parts:
- Gemfile.lock
- ruby:{{ ruby_version }}jobs:
build:
packages:
- docker
steps:
- uses: docker/build@1.0
with:
context: .
push: false
tags: myapp:latestjobs:
deploy:
trigger: manual # Workflow dispatch
# or
trigger:
tags: v* # On git tags only
steps:
- run: ./deploy.sh production- Start with Minimal - Understand the basics
- Add complexity - Services, matrix, skip logic
- Try Monorepo - If you have many projects
- Go Multi-Provider - When you need flexibility
# Before (GitHub Actions)
name: CI
on: [push]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3
bundler-cache: true
- run: bundle exec rspec
# After (CIGen)
jobs:
test:
packages:
- ruby
steps:
- run: bundle exec rspecSavings: 12 lines → 5 lines (58% reduction)
# Before (CircleCI)
version: 2.1
jobs:
test:
docker:
- image: cimg/ruby:3.3
steps:
- checkout
- restore_cache:
keys:
- gems-{{ checksum "Gemfile.lock" }}
- run: bundle install --deployment
- save_cache:
key: gems-{{ checksum "Gemfile.lock" }}
paths:
- vendor/bundle
- run: bundle exec rspec
workflows:
ci:
jobs: [test]
# After (CIGen) - same as above
jobs:
test:
packages:
- ruby
steps:
- run: bundle exec rspecSavings: 18 lines → 5 lines (72% reduction)
- Pick an example that matches your use case
- Copy the
cigen.ymlto your repo - Customize for your needs
- Run
cigen planto preview - Run
cigen renderto generate
Have a great example? Submit a PR!
Requirements:
- Include
cigen.yml - Include
README.mdexplaining use case - Keep it focused on one pattern/feature
- Show what gets auto-generated