Skip to content

Commit 2dae9ad

Browse files
ndbroadbentclaude
andcommitted
Add GitHub Actions provider foundation (Phase 1)
This commit implements the basic infrastructure for generating GitHub Actions workflows from cigen configuration, establishing the foundation for full GitHub Actions support. Changes: **Documentation:** - Add comprehensive plan document: notes/SELF_HOSTING_ON_GITHUB_ACTIONS.md - 7-phase implementation roadmap - Architecture comparison: CircleCI vs GitHub Actions - Job skipping strategy (early-exit pattern for GHA) - Self-hosted runner support design - Dual-provider CI strategy (run on both CircleCI and GitHub Actions) **GitHub Actions Provider Implementation:** - src/providers/github_actions/schema.rs: Complete workflow schema - Workflow, Job, Step structures - RunsOn (single/multiple/detailed with groups/labels) - Strategy (matrix builds) - Service containers - Full step types (run, uses, with parameters) - src/providers/github_actions/generator.rs: Basic workflow generator - Convert cigen Job → GitHub Actions Job - Parse steps from YAML values - Auto-inject checkout step - Convert job requirements → needs (AND dependencies) - Handle CheckoutSetting (Bool/Config) - src/providers/github_actions/mod.rs: Provider implementation - Implements Provider trait - Default output path: .github/workflows - generate_workflow() and generate_all() support - src/providers/github_actions/tests.rs: Test coverage - Provider name and output path tests - Workflow serialization test - Basic workflow generation integration test - src/providers/mod.rs: Register github-actions provider - Add to get_provider() match statement **Test Results:** - ✅ All tests pass (4 new tests) - ✅ Clippy clean (-D warnings) **What Works:** - Basic workflow generation from cigen config - Job dependencies (needs) - Simple run steps - Checkout step injection - YAML serialization **TODO (Future Phases):** - Phase 2: Conditionals, matrices, services, environment variables - Phase 3: Intelligent caching with version detection - Phase 4: Job skipping (early-exit with hash checking) - Phase 5: Self-hosted runners with custom cache backends - Phase 6: Automatic package management - Phase 7: CIGen self-hosting on both providers This is the first step toward "write once, run anywhere" - the same cigen config will work on both CircleCI and GitHub Actions. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 956baf1 commit 2dae9ad

6 files changed

Lines changed: 1929 additions & 0 deletions

File tree

0 commit comments

Comments
 (0)