Skip to content

Deploying on Forgejo/GitHub Actions

This guide walks through adding WuMing to a repository using Forgejo Actions (e.g. on Codeberg) or GitHub Actions.

Prerequisites

You need:

  • A Forgejo API token with at least read repository and write issues permissions. On Codeberg, create one at Settings → Applications → Access tokens.
  • An AI backend API key (or a running Ollama instance). See Choosing a backend below.
  • Forgejo Actions enabled on your repository (on Codeberg: Settings → Activate Forgejo Actions).
  • A container builder on the runner (Docker or Podman) — the Forgejo action builds the Containerfile from source.

Minimal setup

Forgejo Actions (Codeberg or self-hosted Forgejo) — create .forgejo/workflows/ai-review.yml:

on:
  pull_request:

jobs:
  ai-review:
    runs-on: codeberg-tiny
    steps:
      - uses: https://forge.marvin8.zone/marvin8/wuming@main
        with:
          forgejo_token: ${{ secrets.WUMING_FORGEJO_TOKEN }}
          deepseek_key: ${{ secrets.WUMING_DEEPSEEK_KEY }}
          pr_number: ${{ github.event.pull_request.number }}

uses: https://forge.marvin8.zone/marvin8/wuming@<ref> builds the Containerfile from that ref — @main runs the latest commit; pin a tag like @v0.8.0 to run a release.

GitHub Actions (github.com) — create .github/workflows/ai-review.yml. Use the direct image ref instead of uses: https://forge.marvin8.zone/marvin8/wuming@main, because the WuMing repo is hosted on forge.marvin8.zone and has no GitHub mirror:

on:
  pull_request:

jobs:
  ai-review:
    runs-on: ubuntu-latest
    steps:
      - uses: docker://registry.marvin8.zone/marvin8/wuming:latest
        env:
          WUMING_FORGEJO_TOKEN: ${{ secrets.WUMING_FORGEJO_TOKEN }}
          WUMING_DEEPSEEK_KEY: ${{ secrets.WUMING_DEEPSEEK_KEY }}

This runs the default code agent using the DeepSeek backend on every PR.

Adding secrets

  1. Open your repository → Settings → Secrets and Variables → Actions.
  2. Add WUMING_FORGEJO_TOKEN with your Forgejo token value.
  3. Add the API key secret for whichever backend you choose (see below).

Choosing a backend

DeepSeek (default)

      - uses: https://forge.marvin8.zone/marvin8/wuming@main
        with:
          forgejo_token: ${{ secrets.WUMING_FORGEJO_TOKEN }}
          backend: deepseek
          deepseek_key: ${{ secrets.WUMING_DEEPSEEK_KEY }}

Obtain a key at platform.deepseek.com.

Anthropic (Claude)

      - uses: https://forge.marvin8.zone/marvin8/wuming@main
        with:
          forgejo_token: ${{ secrets.WUMING_FORGEJO_TOKEN }}
          backend: anthropic
          anthropic_key: ${{ secrets.WUMING_ANTHROPIC_KEY }}

Obtain a key at console.anthropic.com.

Ollama (self-hosted)

      - uses: https://forge.marvin8.zone/marvin8/wuming@main
        with:
          forgejo_token: ${{ secrets.WUMING_FORGEJO_TOKEN }}
          backend: ollama
          ollama_url: http://ollama.internal:11434

Moonshot (Kimi)

      - uses: https://forge.marvin8.zone/marvin8/wuming@main
        with:
          forgejo_token: ${{ secrets.WUMING_FORGEJO_TOKEN }}
          backend: moonshot
          moonshot_key: ${{ secrets.WUMING_MOONSHOT_KEY }}

Obtain a key at platform.kimi.ai. The default model is kimi-k2.7-code. Use kimi-k3 or kimi-k2.6 via per-agent model selection.

Selecting agents

      - uses: https://forge.marvin8.zone/marvin8/wuming@main
        with:
          forgejo_token: ${{ secrets.WUMING_FORGEJO_TOKEN }}
          deepseek_key: ${{ secrets.WUMING_DEEPSEEK_KEY }}
          agents: code,config,docs,security,shell

Valid names: code, config, docs, performance, security, shell, tests.

See the Agents reference for what each agent covers.

Per-agent model selection

Append :model to any agent name:

          agents: code:deepseek-v4-pro,config,security

WUMING_MAX_TOKENS is automatically raised to 16384 for all DeepSeek and Moonshot calls.

Handling large PRs

      - uses: https://forge.marvin8.zone/marvin8/wuming@main
        with:
          forgejo_token: ${{ secrets.WUMING_FORGEJO_TOKEN }}
          deepseek_key: ${{ secrets.WUMING_DEEPSEEK_KEY }}
          max_diff_lines: "2000"

Debugging and dry runs

To test your configuration without posting any comments to a real PR, enable dry-run mode. WuMing will fetch the diff and run agents as normal, but log the would-be comments instead of posting them:

      - uses: https://forge.marvin8.zone/marvin8/wuming@main
        with:
          forgejo_token: ${{ secrets.WUMING_FORGEJO_TOKEN }}
          deepseek_key: ${{ secrets.WUMING_DEEPSEEK_KEY }}
          dry_run: "true"

To inspect the raw LLM request and response for troubleshooting (e.g. malformed agent output or unexpected filtering), enable verbose logging. Note that logs will contain repository source code:

          verbose: "true"

To post a plain PR-level summary comment with per-agent severity counts after the review:

          summary_comment: "true"

Self-hosted Forgejo instances

By default WuMing auto-detects the Forgejo URL from the runner environment. On a self-hosted instance where the runner reports a different URL, override it explicitly:

      - uses: https://forge.marvin8.zone/marvin8/wuming@main
        with:
          forgejo_token: ${{ secrets.WUMING_FORGEJO_TOKEN }}
          deepseek_key: ${{ secrets.WUMING_DEEPSEEK_KEY }}
          forgejo_url: https://forgejo.mycompany.internal

Full example

For Forgejo Actions (Codeberg / self-hosted Forgejo):

on:
  pull_request:

jobs:
  ai-review:
    runs-on: codeberg-tiny
    steps:
      - uses: https://forge.marvin8.zone/marvin8/wuming@main
        with:
          forgejo_token: ${{ secrets.WUMING_FORGEJO_TOKEN }}
          deepseek_key: ${{ secrets.WUMING_DEEPSEEK_KEY }}
          pr_number: ${{ github.event.pull_request.number }}
          agents: code:deepseek-v4-flash,config,security
          max_diff_lines: "2000"
          skip_paths: "*.lock,vendor/**"

For GitHub Actions (github.com), replace uses: https://forge.marvin8.zone/marvin8/wuming@main with uses: docker://registry.marvin8.zone/marvin8/wuming:latest and set runs-on: ubuntu-latest. Also replace the with: block with an env: block using WUMING_* variable names (e.g. WUMING_FORGEJO_TOKEN, WUMING_DEEPSEEK_KEY) — when GitHub Actions uses docker://, it does not process action.yml, so with: keys are not mapped to WUMING_* environment variables.

See the Configuration reference for all inputs.