learning_ai_common_plat/docs/devops/GITEA_LOCAL_CI.md
saravanakumardb1 6d4579da37 chore(ci): migrate to Gitea local CI, disable GitHub Actions
- Add .gitea/workflows/ci.yml for Gitea Actions
- Disable GitHub Actions: ci-extraction-service, ci-mcp-server, reusable-pnpm-workspace
- Add docs/devops/GITEA_LOCAL_CI.md setup guide
2026-03-22 20:13:02 -07:00

3.9 KiB

Gitea Local CI — Self-Hosted CI for ByteLyst Ecosystem

Overview

Self-hosted Gitea + act_runner replaces GitHub Actions (billing blocked). Runs CI jobs directly on your Mac — no Docker required.

Architecture

Component Port Purpose
Gitea 3300 Git hosting + Actions engine
act_runner Executes CI jobs on host (macOS)
  • GitHub (origin) — unchanged, primary code hosting
  • Gitea (gitea) — secondary remote, triggers local CI on push

Credentials

Quick Commands

# Start services
brew services start gitea
brew services start act_runner

# Stop services
brew services stop act_runner
brew services stop gitea

# Check status
brew services list | grep -E "gitea|act_runner"

# Push to trigger CI
git push gitea main

Config Locations

File Path
Gitea config /opt/homebrew/var/gitea/custom/conf/app.ini
Runner config /opt/homebrew/etc/act_runner/config.yaml
Runner registration /opt/homebrew/var/act_runner/.runner
Gitea data /opt/homebrew/var/gitea/data/
Gitea logs /opt/homebrew/var/gitea/log/
Job work dir ~/.cache/act/

How It Works

  1. You git push gitea main from any repo
  2. Gitea detects .gitea/workflows/ci.yml in the pushed code
  3. act_runner picks up the job and runs it on your Mac (host mode)
  4. Jobs have access to node, pnpm, python, etc. from your system PATH
  5. @bytelyst/* packages are built from the local common-plat checkout (/Users/sd9235/code/mygh/learning_ai_common_plat)

Repos Configured

All 14 repos have:

  • gitea remote → http://localhost:3300/bytelyst/<repo>.git
  • .gitea/workflows/ci.yml — Gitea Actions workflow (adapted from GitHub Actions)
  • .github/workflows/ci.yml.disabled — GitHub Actions disabled

Differences from GitHub Actions

Feature GitHub Actions Gitea Actions
Runner Ubuntu container macOS host
common-plat checkout actions/checkout with repository: + GH_PAT Already on disk at $COMMON_PLAT
Node setup actions/setup-node@v4 Already installed via brew
pnpm setup pnpm/action-setup@v4 Already installed via brew
Concurrency Free tier limited Unlimited (local)

Push to Both Remotes

To push to both GitHub and Gitea in one command, add a script alias:

# Add to ~/.zshrc
gpush() { git push origin main && git push gitea main; }

Troubleshooting

Runner not picking up jobs

brew services restart act_runner
# Check logs
tail -50 /opt/homebrew/var/log/act_runner.log

Gitea not responding

brew services restart gitea
curl -s http://localhost:3300/api/v1/version

Re-register runner

brew services stop act_runner
rm /opt/homebrew/var/act_runner/.runner
TOKEN=$(curl -s -u "bytelyst:bytelyst123" http://localhost:3300/api/v1/admin/runners/registration-token | python3 -c "import sys,json; print(json.load(sys.stdin)['token'])")
cd /opt/homebrew/var/act_runner && /opt/homebrew/opt/act_runner/bin/act_runner register --config /opt/homebrew/etc/act_runner/config.yaml --instance http://localhost:3300 --token "$TOKEN" --name bytelyst-mac --no-interactive
brew services start act_runner