@artik0din/turbogha
v2.0.0
Published
Turborepo Remote Caching for GitHub Actions - Fast, free, and independent from Vercel
Maintainers
Readme
TurboGHA
Free, self-hosted Turborepo remote caching for GitHub Actions
Why TurboGHA?
Turborepo remote caching typically requires a Vercel account. TurboGHA provides a free alternative using GitHub's built-in cache.
| | TurboGHA | Vercel | |---|:---:|:---:| | Cost | Free | Paid | | Setup | 1 line | Account + tokens | | Dependencies | None | Vercel account |
Quick Start
- uses: globodai-group/caching-for-turbo@v1
- run: turbo buildThat's it.
How It Works
┌──────────────────────────────────────────────────┐
│ GitHub Actions Runner │
├──────────────────────────────────────────────────┤
│ │
│ ┌─────────┐ ┌──────────────┐ │
│ │ Turbo │ ◄─────► │ TurboGHA │ │
│ │ Build │ HTTP │ :41230 │ │
│ └─────────┘ └──────┬───────┘ │
│ │ │
│ ▼ │
│ ┌──────────────────┐ │
│ │ GitHub Cache │ │
│ │ (10GB free) │ │
│ └──────────────────┘ │
└──────────────────────────────────────────────────┘- Starts a local Fastify server on
localhost:41230 - Configures
TURBO_API,TURBO_TOKEN,TURBO_TEAM - Intercepts Turbo cache requests → GitHub Cache API
- Displays statistics on shutdown
Configuration
- uses: globodai-group/caching-for-turbo@v1
with:
# Cache key prefix (useful for isolation)
cache-prefix: my-project_
# Server port (default: 41230)
server-port: 41230Inputs
| Input | Description | Default |
|-------|-------------|---------|
| cache-prefix | Cache key prefix | turbogha_ |
| server-port | Server port | 41230 |
CLI (Local Development)
npm install -g @artik0din/turbogha# Start server
turbogha start
# Configure Turbo
export TURBO_API=http://localhost:41230
export TURBO_TOKEN=turbogha
export TURBO_TEAM=turbogha
# Build
turbo build
# Stop server
turbogha killExamples
Monorepo
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: globodai-group/caching-for-turbo@v1
- run: npm ci
- run: turbo buildMatrix Build
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: globodai-group/caching-for-turbo@v1
with:
cache-prefix: ${{ matrix.os }}_
- run: npm ci
- run: turbo build test lintMetrics
TurboGHA displays statistics on shutdown:
╔══════════════════════════════════════════╗
║ TurboGHA Statistics ║
╠══════════════════════════════════════════╣
║ Cache Hit Rate: 85.7% ║
║ Hits: 12 | Misses: 2 ║
╠══════════════════════════════════════════╣
║ Uploads: 2 ( 12.4MB) ║
║ Downloads: 12 ( 89.2MB) ║
╠══════════════════════════════════════════╣
║ Avg Save: 245ms ║
║ Avg Get: 89ms ║
╚══════════════════════════════════════════╝Troubleshooting
Cache not being used?
- Run action before
turbocommands - Check
TURBO_API,TURBO_TOKEN,TURBO_TEAMare set
Server fails to start?
- Check port 41230 is available
- Try different port with
server-port
Contributing
git clone https://github.com/globodai-group/caching-for-turbo.git
npm install
npm run dev-run
npm run bundleLicense
MIT
