Skip to main content

GitHub Actions Engineer

CI/CD specialist creating and maintaining GitHub Actions workflows for automated testing and deployment.

Quick Reference

PropertyValue
DomainDevOps
FORGE Stage3 (BUILD)
Version1.0.0
Output TypesWorkflow YAML, documentation

Overview

Use this agent when you need to:
  • Generate CI workflows for new repositories
  • Create deployment workflows for Railway
  • Set up PR validation and checks
  • Configure caching and parallelization
  • Implement security scanning (CodeQL, dependency review)
  • Document required secrets and setup
The GitHub Actions Engineer creates optimized CI/CD workflows with security best practices, intelligent caching, and efficient job parallelization.

Core Capabilities

Workflow Generation

Create complete CI/CD workflow YAML files with test, lint, build, and deploy jobs

Job Optimization

Design efficient job matrices, parallelization strategies, and dependency caching

Secret Management

Document required secrets without exposure, with setup instructions

Branch Protection

Define rules for protected branches and PR requirements

When to Use

Creating CI pipeline for a new SO1 repository
Setting up automated deployment to Railway
Adding PR validation (title, size, changesets)
Implementing security scanning workflows
Optimizing existing workflows (caching, parallelization)
Documenting secrets and GitHub Actions setup
Not suitable for:
  • GitLab CI, CircleCI, or other CI systems
  • Manual deployment processes
  • Non-GitHub repositories

Usage Examples

Complete CI pipeline with lint, test, build, and security scanning:
# .github/workflows/ci.yml
name: CI

on:
  push:
    branches: [main, develop]
  pull_request:
    branches: [main, develop]

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

env:
  NODE_VERSION: '20'
  PNPM_VERSION: '9'

jobs:
  # Lint and Type Check
  lint:
    name: Lint & Type Check
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: pnpm/action-setup@v3
        with:
          version: ${{ env.PNPM_VERSION }}
      - uses: actions/setup-node@v4
        with:
          node-version: ${{ env.NODE_VERSION }}
          cache: 'pnpm'
      - run: pnpm install --frozen-lockfile
      - run: pnpm lint
      - run: pnpm typecheck

  # Unit Tests
  test:
    name: Test
    runs-on: ubuntu-latest
    needs: lint
    steps:
      - uses: actions/checkout@v4
      - uses: pnpm/action-setup@v3
      - uses: actions/setup-node@v4
        with:
          cache: 'pnpm'
      - run: pnpm install --frozen-lockfile
      - run: pnpm test -- --coverage
      - uses: codecov/codecov-action@v4
        with:
          token: ${{ secrets.CODECOV_TOKEN }}

  # Build
  build:
    name: Build
    runs-on: ubuntu-latest
    needs: lint
    steps:
      - uses: actions/checkout@v4
      - uses: pnpm/action-setup@v3
      - uses: actions/setup-node@v4
        with:
          cache: 'pnpm'
      - run: pnpm install --frozen-lockfile
      - run: pnpm build
      - uses: actions/upload-artifact@v4
        with:
          name: build
          path: dist/

  # Security Scan
  security:
    name: Security Scan
    runs-on: ubuntu-latest
    permissions:
      security-events: write
    steps:
      - uses: actions/checkout@v4
      - uses: github/codeql-action/analyze@v3
        with:
          languages: typescript
Result: Parallelized CI pipeline with lint, test, build running concurrently, plus security scanning.

Outputs

Workflow Files

# .github/workflows/ci.yml - Main CI pipeline
# .github/workflows/deploy.yml - Deployment workflow
# .github/workflows/pr-check.yml - PR validation

Secrets Documentation

# Required GitHub Secrets

| Secret | Purpose | Where to Get |
|--------|---------|--------------|
| `RAILWAY_TOKEN` | Railway deployments | Railway dashboard → Account → Tokens |
| `CODECOV_TOKEN` | Coverage uploads | Codecov dashboard → Repository Settings |
| `SLACK_WEBHOOK_URL` | Deployment notifications | Slack App → Incoming Webhooks |
| `NPM_TOKEN` | Package publishing | npm account → Access Tokens |

## Setup Instructions

1. Go to repository Settings → Secrets and variables → Actions
2. Click "New repository secret"
3. Add each secret with the name and value from your provider
4. For environment-specific secrets (staging/production), create them under Environments

Caching Strategies

# pnpm cache
- uses: pnpm/action-setup@v3
  with:
    version: 9
- uses: actions/setup-node@v4
  with:
    node-version: 20
    cache: 'pnpm'

# Turbo cache
- uses: actions/cache@v4
  with:
    path: .turbo
    key: turbo-${{ github.sha }}
    restore-keys: turbo-

# Docker layer cache
- uses: docker/build-push-action@v5
  with:
    cache-from: type=gha
    cache-to: type=gha,mode=max

FORGE Gate Compliance

Entry Gates (Pre-conditions)

The agent needs to understand the repository structure (monorepo vs single package), programming language, and package manager (npm, pnpm, yarn).
Test commands must be defined in package.json scripts (e.g., npm test, pnpm test:unit).
If CD is needed, deployment targets (Railway, Vercel, etc.) and environments must be specified.

Exit Gates (Post-conditions)

The .github/workflows/ci.yml file is created with test, lint, and build jobs, and all jobs pass on initial run.
If deployment is required, .github/workflows/deploy.yml is created with proper environment configurations.
All required secrets are documented in README.md or CONTRIBUTING.md with instructions on how to obtain and configure them.
Recommended branch protection rules (require PR, require status checks) are documented for repository administrators.

Integration Points

Veritas Prompts

Prompt IDPurpose
vrt-h8i9j0k1GitHub Actions best practices (workflow structure, caching, security patterns)
vrt-l2m3n4o5Security scanning guidelines (CodeQL configuration, SAST tools, dependency review)

Target Repositories

All SO1 repositories are CI/CD targets:
  • so1-io/so1-control-plane-api - Hono backend
  • so1-io/so1-console - Next.js frontend
  • so1-io/so1-shared - Shared TypeScript types
  • so1-io/so1-agents - Agent definitions
  • so1-io/veritas - Prompt library
AgentRelationshipUse Case
Railway DeployerDownstreamTriggered by CD workflow for deployments
Pipeline AuditorPeerReviews generated workflows for security and efficiency
Hono BackendCreatesDefines the test/build commands used in CI
Next.js FrontendCreatesDefines the test/build commands used in CI

Source Files

View Agent Source

Repository: so1-io/so1-agents
Path: agents/devops/github-actions.md
Version: 1.0.0

Common Patterns

Matrix Builds

Test across multiple Node.js versions and operating systems:
jobs:
  test:
    strategy:
      matrix:
        node: [18, 20, 22]
        os: [ubuntu-latest, macos-latest]
      fail-fast: false
    runs-on: ${{ matrix.os }}
    steps:
      - uses: actions/setup-node@v4
        with:
          node-version: ${{ matrix.node }}

Concurrency Control

Prevent duplicate workflow runs:
concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

Required Permissions

Grant minimal permissions for security:
permissions:
  contents: read        # Clone repository
  pull-requests: write  # Comment on PRs
  checks: write         # Update check status

Common Workflow Errors

ErrorCauseResolution
Workflow syntax errorInvalid YAMLUse GitHub Actions workflow linter
Permission deniedMissing permissions blockAdd permissions: with required scopes
Cache missWrong cache key patternUpdate cache key to include lock file hash
TimeoutJob running too longSplit into parallel jobs or increase timeout-minutes

Next Steps: