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
This commit is contained in:
parent
8070009fde
commit
6d4579da37
29
.gitea/workflows/ci.yml
Normal file
29
.gitea/workflows/ci.yml
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
name: CI — Common Platform
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-and-test:
|
||||||
|
name: Build, Test & Typecheck
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 15
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: pnpm install --frozen-lockfile
|
||||||
|
|
||||||
|
- name: Build all packages
|
||||||
|
run: pnpm build
|
||||||
|
|
||||||
|
- name: Typecheck
|
||||||
|
run: pnpm typecheck
|
||||||
|
|
||||||
|
- name: Test
|
||||||
|
run: pnpm test
|
||||||
112
docs/devops/GITEA_LOCAL_CI.md
Normal file
112
docs/devops/GITEA_LOCAL_CI.md
Normal file
@ -0,0 +1,112 @@
|
|||||||
|
# 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
|
||||||
|
|
||||||
|
- **URL:** http://localhost:3300
|
||||||
|
- **Username:** `bytelyst`
|
||||||
|
- **Password:** `bytelyst123`
|
||||||
|
|
||||||
|
## Quick Commands
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 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:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Add to ~/.zshrc
|
||||||
|
gpush() { git push origin main && git push gitea main; }
|
||||||
|
```
|
||||||
|
|
||||||
|
## Troubleshooting
|
||||||
|
|
||||||
|
### Runner not picking up jobs
|
||||||
|
|
||||||
|
```bash
|
||||||
|
brew services restart act_runner
|
||||||
|
# Check logs
|
||||||
|
tail -50 /opt/homebrew/var/log/act_runner.log
|
||||||
|
```
|
||||||
|
|
||||||
|
### Gitea not responding
|
||||||
|
|
||||||
|
```bash
|
||||||
|
brew services restart gitea
|
||||||
|
curl -s http://localhost:3300/api/v1/version
|
||||||
|
```
|
||||||
|
|
||||||
|
### Re-register runner
|
||||||
|
|
||||||
|
```bash
|
||||||
|
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
|
||||||
|
```
|
||||||
Loading…
Reference in New Issue
Block a user