Reusable Forgejo Actions CI/CD workflow templates for all project-incubator repos
- Shell 100%
93 tuning-data clones identified (~6.9 GB) across Karpathy, tool, ad SDK, SEO, and cloud platform categories. Needed to plan runner capacity recovery for M-6 pilot deploy. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .claude/data/sessions | ||
| logs | ||
| ci.yml | ||
| deploy.yml | ||
| FORGEJO-REPO-INVENTORY.md | ||
| install.sh | ||
| MILESTONE-CONTRACT-CICD.md | ||
| README.md | ||
Forgejo Actions Workflow Templates
Reusable CI/CD templates for all project-incubator repos.
Quick Start
# Copy CI template to your project
mkdir -p <repo>/.forgejo/workflows
cp ci.yml <repo>/.forgejo/workflows/ci.yml
# Add deploy pipeline (optional)
cp deploy.yml <repo>/.forgejo/workflows/deploy.yml
Or use the install script:
./install.sh ~/project-incubator/myproject # CI only
./install.sh ~/project-incubator/myproject --deploy # CI + deploy
Templates
ci.yml — Lint, Test, Build
Auto-detects your stack and runs only relevant checks:
| Stack | Lint | Test | Build |
|---|---|---|---|
| Node (npm) | ESLint, tsc | npm test | Docker build |
| Bun | ESLint, tsc | bun test | Docker build |
| Python | ruff | pytest | Docker build |
| Rust | clippy, fmt | cargo test | Docker build |
| Go | go vet | go test | Docker build |
| Shell | shellcheck | — | — |
| Docker | hadolint | — | buildx |
Triggers: push to main/master/develop, PRs to main/master.
Toggle features via Forgejo repo variables (Settings > Actions > Variables):
SKIP_SECURITY_SCAN=true— disable gitleaksSKIP_DOCKER_BUILD=true— skip Docker build step
deploy.yml — SSH Deploy + Rollback
Pipeline: build image → push to registry → SSH pull + restart → health check → rollback on failure → ntfy alert.
Triggers: push to main/master, manual dispatch.
Required Secrets (deploy.yml)
Set in Forgejo: repo Settings > Actions > Secrets
| Secret | Description | Example |
|---|---|---|
DEPLOY_HOST |
SSH target | 192.168.183.110 |
DEPLOY_USER |
SSH user | pook |
DEPLOY_KEY |
SSH private key | (paste full key) |
DEPLOY_PATH |
Remote project path | /home/pook/contractpilot |
Optional Secrets (deploy.yml)
| Secret | Default | Description |
|---|---|---|
HEALTH_PORT |
3000 |
Port for health check |
HEALTH_URL |
http://localhost:${HEALTH_PORT}/healthz |
Full health URL override |
NTFY_TOPIC |
— | ntfy.sh topic for alerts |
REGISTRY_HOST |
— | Docker registry (enables image push) |
REGISTRY_USER |
— | Registry username |
REGISTRY_PASS |
— | Registry password |
IMAGE_NAME |
repo name | Docker image name |
Runner Info
- Container:
code.forgejo.org/forgejo/runner:6.3.1 - Capacity: 3 concurrent jobs
- Labels:
ubuntu-latest,docker,devuan-host - Location:
/home/pook/agent-sandbox/runner-data/
Rollout Checklist
Repos that need workflows added:
- ralph-service
- agent-test
- claude-super-dispatch
- deploypilot
- flowforge
- skillforge
- voicedesk
- cubesandbox
- agentapi