Skip to content

🌍 Epic: Implement GitHub Actions support for platform portability #15

@kingdonb

Description

@kingdonb

🎯 Epic: GitHub Actions Support for Platform Portability

Implement GitHub Actions workflow components equivalent to our GitLab CI pipeline, enabling hephy-builder to work seamlessly across both platforms.

πŸ“‹ Current State

  • βœ… GitLab CI: Full implementation in .gitlab-ci.yml (495 lines, production ready)
  • ❌ GitHub Actions: Not yet implemented
  • πŸ“– Design: PLATFORM_PORTABILITY.md contains initial architecture planning

πŸ—οΈ Architecture Vision

Component-Based Design

hephy-builder/
β”œβ”€β”€ github/
β”‚   β”œβ”€β”€ workflows/
β”‚   β”‚   β”œβ”€β”€ hephy-build.yml     # Reusable workflow
β”‚   β”‚   └── hephy-deploy.yml    # Optional deployment
β”‚   └── actions/
β”‚       β”œβ”€β”€ prepare/            # Change detection action
β”‚       β”œβ”€β”€ build/              # Multi-arch build action
β”‚       └── manifest/           # Manifest creation action
β”œβ”€β”€ gitlab/
β”‚   β”œβ”€β”€ hephy-build.yml         # Include template
β”‚   └── components/             # Job templates
└── shared/
    β”œβ”€β”€ scripts/                # Platform-agnostic scripts
    └── configs/                # Default configurations

πŸ”§ Implementation Phases

Phase 1: Core Workflow Translation

  • Create GitHub Actions workflow equivalent to .gitlab-ci.yml
  • Port prepare stage (change detection, architecture filtering)
  • Implement multi-arch build jobs for GitHub-hosted runners
  • Add manifest creation stage using existing manifest-tool

Phase 2: Reusable Actions

  • Create kingdon-ci/hephy-builder-action repository
  • Package prepare, build, and manifest stages as reusable actions
  • Implement configuration abstraction layer
  • Add comprehensive action documentation

Phase 3: Platform Abstraction

  • Design .hephy/config.yaml format for platform-agnostic configuration
  • Create conversion tools between GitLab CI and GitHub Actions
  • Implement shared script library for platform independence
  • Add platform detection and adaptation logic

Phase 4: Enterprise Features

  • Self-hosted runner support (GitHub Enterprise)
  • Custom registry configuration
  • Advanced security and compliance features
  • Integration with enterprise CI/CD systems

πŸ“Š Technical Requirements

GitHub Actions Workflow Features

  • Multi-arch support: Leverage GitHub's runs-on matrix for amd64/arm64
  • ECR authentication: AWS configure-credentials action integration
  • Change detection: Port hack/prepare_diff.sh to GitHub context
  • Artifact management: Use GitHub Actions artifacts for build coordination
  • Conditional execution: Smart job skipping based on architecture needs

Backward Compatibility

  • βœ… Zero breaking changes: Existing GitLab CI continues unchanged
  • βœ… Configuration compatibility: Same build-config.yaml format
  • βœ… Registry support: All existing destinations (ECR, Docker Hub, etc.)

🎯 Success Criteria

Functional Parity

  • GitHub Actions workflow builds identical images to GitLab CI
  • Multi-arch manifest creation works correctly
  • Change detection and architecture filtering functional
  • Performance comparable to GitLab CI pipeline

Developer Experience

  • Drop-in GitHub Actions component for any repository
  • Clear migration guide from GitLab CI to GitHub Actions
  • Comprehensive documentation and examples
  • One-command setup for new repositories

Testing Validation

  • Successful builds on GitHub-hosted runners
  • Multi-arch image validation
  • Registry push/pull verification
  • End-to-end workflow testing

πŸ”— Related Issues

This epic supports:

πŸ’‘ Implementation Strategy

Incremental Development

  1. Start with simple workflow: Single-arch builds first
  2. Add multi-arch support: Leverage GitHub's runner matrix
  3. Extract reusable actions: Package for community use
  4. Add platform abstraction: Support both GitLab and GitHub

Community Impact

  • Lower barrier to entry: GitHub Actions more accessible than GitLab CI
  • Broader adoption: Tap into GitHub's massive developer base
  • Enterprise appeal: Support both major Git platforms
  • Open source growth: Easier for contributors to test and contribute

πŸ“š Resources

GitHub Actions Documentation

Reference Implementations

  • Existing GitLab CI pipeline (.gitlab-ci.yml)
  • hack/prepare_diff.sh change detection logic
  • Multi-arch manifest creation patterns

Testing Infrastructure

  • GitHub-hosted runners (amd64/arm64)
  • ECR registry access
  • Test repositories for validation

This is a high-impact issue that transforms hephy-builder from "GitLab-only" to "platform-portable" - a key differentiator in the modern CI/CD landscape.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions