GitHub Actions Local Runner - Test and debug your GitHub Actions workflows locally with Docker
GoGH is a lightweight, fast local runner for GitHub Actions workflows. Instead of pushing to GitHub and waiting for Actions to run, test your workflows locally with full Docker support, real-time logging, and terminal-based progress tracking.
- π§ Local Workflow Execution - Run GitHub Actions workflows on your machine
- π³ Docker Integration - Full container support with automatic image management
- π Real-time Display - Beautiful terminal UI showing workflow progress
- π Detailed Logging - Comprehensive logs with timestamps and structured output
- π Environment Variables - Full support for workflow and step-level environment variables
- β‘ Action Support - Execute both
uses:actions andrun:commands - π― Expression Evaluation - Support for GitHub Actions expressions (
${{ }}) - π³ Dependency Resolution - Automatic job dependency and execution order calculation
- Go 1.19+ - Install Go
- Verify:
go version
- Verify:
- Docker - Install Docker
- Verify:
docker --version - Docker must be running - Start Docker Desktop or
sudo systemctl start docker
- Verify:
- Git (optional) - For cloning repositories
# 1. Verify prerequisites
go version # Should show Go 1.19+
docker --version && docker info # Docker must be running
# 2. Clone the repository
git clone https://github.com/Neoxs/gogh.git
cd gogh
# 3. Build the binary
go build -o gogh ./cmd/runner
# Or install directly (still requires Docker running)
go install github.com/Neoxs/gogh/cmd/runner@latest
β οΈ Important: Docker daemon must be running before executing workflows, as GoGH creates and manages Docker containers for job execution.
# First, ensure Docker is running
docker info # Should show Docker system info without errors
# Run a workflow file
./gogh run .github/workflows/ci.yml
# Or if installed globally
runner run .github/workflows/ci.ymlCommon Issues:
Cannot connect to the Docker daemonβ Start Docker Desktop or Docker servicedocker: command not foundβ Install Docker and add to PATHpermission deniedβ On Linux, add user to docker group or usesudo
Create a workflow file .github/workflows/test.yml:
name: Test Workflow
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
- name: Install dependencies
run: npm install
- name: Run tests
run: npm testRun it locally:
./gogh run .github/workflows/test.ymlname: Build and Deploy
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build application
run: |
echo "Building application..."
make build
test:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run tests
run: make test
deploy:
needs: [build, test]
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- name: Deploy to production
run: echo "Deploying to production..."GoGH is built with a modular architecture:
gogh/
βββ cmd/runner/ # CLI entry point
βββ container/ # Docker container management
βββ internal/
β βββ executor/ # Workflow execution engine
β βββ workflow/ # YAML parsing and validation
β βββ logging/ # Structured logging system
β βββ display/ # Terminal UI and progress tracking
β βββ environment/ # Environment variable management
β βββ expressions/ # GitHub Actions expression evaluator
β βββ actions/ # Action resolution and execution
βββ README.md
- π Executor Engine - Orchestrates workflow execution with proper job dependency resolution
- π³ Container Manager - Handles Docker container lifecycle, volume mounting, and command execution
- π Logging System - Multi-level logging with separate files for workflows and jobs
- π₯οΈ Terminal Display - Real-time progress updates with job and step status
- π Environment Manager - Manages environment variables across workflow, job, and step scopes
- β‘ Expression Evaluator - Evaluates GitHub Actions expressions and context variables
- Workflow Parsing - Full YAML workflow parsing with validation
- Job Execution - Sequential job execution with dependency resolution
- Docker Support - Ubuntu runners (
ubuntu-latest,ubuntu-22.04,ubuntu-20.04) - Environment Variables - Workflow, job, and step-level environment variables
- Actions - Basic action execution (
uses:syntax) - Run Commands - Shell command execution (
run:syntax) - Expression Evaluation -
${{ }}expressions with context access - Conditional Execution - Basic
if:condition support - Real-time Logging - Structured logs with timestamps
- Parallel Job Execution - Run independent jobs concurrently
- More Runners - Windows and macOS runner support
- Advanced Actions - Full GitHub Actions marketplace compatibility
- Secrets Management - Local secrets and secure environment variables
- Matrix Builds - Strategy matrix support for multiple configurations
- Caching - Dependency and build caching
- Artifacts - Upload and download artifact support
- Service Containers - Database and service container support
GoGH automatically maps GitHub runner types to Docker images:
| GitHub Runner | Docker Image |
|---|---|
ubuntu-latest |
ubuntu:latest |
ubuntu-22.04 |
ubuntu:22.04 |
ubuntu-20.04 |
ubuntu:20.04 |
| Custom images | Pass-through support |
GoGH supports all standard GitHub Actions environment variables:
GITHUB_WORKSPACE- Workspace directory (/workspace)GITHUB_REPOSITORY- Repository nameGITHUB_SHA- Commit SHAGITHUB_REF- Git referenceGITHUB_EVENT_NAME- Event that triggered the workflowGITHUB_ACTOR- User who triggered the workflow
When running workflows, GoGH expects this structure:
your-project/
βββ .github/
β βββ workflows/
β βββ ci.yml
β βββ deploy.yml
βββ src/
βββ tests/
βββ gogh-logs/ # Generated log files
βββ workflow-TIMESTAMP/
βββ workflow.log
βββ job-TIMESTAMP.log
GoGH provides comprehensive logging:
- Workflow logs - High-level workflow execution logs
- Job logs - Individual job execution with container details
- Step logs - Real-time output from each step
- Structured format - GitHub Actions compatible log format
Logs are stored in gogh-logs/ with timestamps for easy debugging.
We welcome contributions! Here's how you can help:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Make your changes and add tests
- Run tests:
go test ./... - Commit changes:
git commit -m 'Add amazing feature' - Push to branch:
git push origin feature/amazing-feature - Open a Pull Request
- π New Features - Implement planned features or suggest new ones
- π Bug Fixes - Help us squash bugs and improve stability
- π Documentation - Improve docs, add examples, write tutorials
- π§ͺ Testing - Add test cases and improve test coverage
- π¨ UI/UX - Enhance the terminal display and user experience
- π§ Actions Support - Add support for more GitHub Actions
This project is licensed under the MIT License - see the LICENSE file for details.
- π Bug Reports - Open an issue
- π‘ Feature Requests - Suggest a feature
- π¬ Discussions - Join the conversation
