Reusable Forgejo Actions CI/CD workflow templates for all project-incubator repos
Find a file
pookNast 07a98f2d3a docs: Forgejo repo inventory — 186 repos categorized for cleanup
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>
2026-04-27 09:48:06 -04:00
.claude/data/sessions docs: update contract — M-3/M-4/M-5 DONE, M-6 in progress 2026-04-27 06:53:24 -04:00
logs docs: update contract — M-3/M-4/M-5 DONE, M-6 in progress 2026-04-27 06:53:24 -04:00
ci.yml feat: reusable Forgejo Actions CI/CD workflow templates 2026-04-26 19:53:48 -04:00
deploy.yml docs: update contract — M-3/M-4/M-5 DONE, M-6 in progress 2026-04-27 06:53:24 -04:00
FORGEJO-REPO-INVENTORY.md docs: Forgejo repo inventory — 186 repos categorized for cleanup 2026-04-27 09:48:06 -04:00
install.sh feat: reusable Forgejo Actions CI/CD workflow templates 2026-04-26 19:53:48 -04:00
MILESTONE-CONTRACT-CICD.md docs: mark M-0, M-1, M-2 as DONE in CI/CD contract 2026-04-26 20:59:57 -04:00
README.md feat: reusable Forgejo Actions CI/CD workflow templates 2026-04-26 19:53:48 -04:00

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 gitleaks
  • SKIP_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