# Gitea, Forgejo & Codeberg

> **Availability notice:** Self-serve onboarding in [app.membl.io](https://app.membl.io) currently focuses on **GitHub**. Gitea, Forgejo, and Codeberg connections are paused for general self-serve. [Contact us](/contact) if your team needs access.

membl supports **Gitea** (`gitea.com` and self-hosted instances) and **Forgejo / Codeberg** (`codeberg.org` and self-hosted Forgejo instances) when multi-forge access is enabled for your workspace. Run existing `.gitea/workflows/*.yml` and `.forgejo/workflows/*.yml` pipelines zero-edit on single-use ephemeral runners, or switch to native `.membl/workflows/*.yml` with automatic commit and pull request status reporting.

<Cards>
  <Card title="Multi-Forge Overview" href="/docs/multi-forge">
    All 7 supported forge families and dual execution modes.
  </Card>

  <Card title="Source Control Security" href="/docs/source-control-security">
    HTTPS enforcement, SSRF guards, and HMAC webhook verification.
  </Card>

  <Card title="Workflow Schema v1" href="/docs/workflow-schema">
    Native 

    `.membl/workflows/*.yml`

     syntax and cache presets.
  </Card>
</Cards>

## Connecting Gitea, Forgejo, or Codeberg

<Steps>
  <Step>
    ### 1. Add your instance in Source Control settings

    Open **Settings -> Connections -> Source Control** in [app.membl.io](https://app.membl.io):

    * **Gitea (`gitea.com` or self-hosted)**: Authorize via OAuth or enter your HTTPS instance URL and an access token (or import a 1Password `op://` reference).
    * **Forgejo / Codeberg (`codeberg.org` or self-hosted)**: Connect `codeberg.org` via OAuth or enter your self-hosted Forgejo HTTPS URL and access token.
  </Step>

  <Step>
    ### 2. Signed HMAC webhooks

    membl verifies incoming payloads using per-forge HMAC signatures:

    * Gitea webhooks arrive at `POST /api/gitea/webhook` verified with `X-Gitea-Signature`.
    * Forgejo and Codeberg webhooks arrive at `POST /api/forgejo/webhook` verified with `X-Forgejo-Signature`.

    Your verified instance hostname is automatically added to your workspace egress allowlist so sandboxes can clone and report job status over HTTPS.
  </Step>
</Steps>

## Option A: Zero-edit `.gitea/workflows/` and `.forgejo/workflows/`

For existing Gitea Actions and Forgejo Actions workflows, membl requests an ephemeral runner registration token via `/api/v1/{orgs,repos}/.../actions/runners/registration-token` and boots a single-use sandbox running `act_runner` (`--ephemeral --once`). After that one job finishes, the sandbox is torn down cleanly.

Update `runs-on` in `.gitea/workflows/ci.yml` or `.forgejo/workflows/ci.yml` to your assigned membl runner label (`<your-membl-label>`):

```yaml
name: CI

on: [push, pull_request]

jobs:
  test:
    runs-on: <your-membl-label>
    steps:
      - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
      - run: npm ci
      - run: npm test
```

## Option B: Native `.membl/workflows/*.yml` pipelines

To share one declarative workflow across Gitea, Forgejo, Codeberg, and any other connected forge, place `.membl/workflows/ci.yml` in your repository. membl parses pushes and pull requests from the signed webhook, executes jobs on warm Linux x64 sandboxes with in-place block-overlay caches on membl runners, and posts commit and pull request statuses back to your Gitea or Forgejo instance.

## Next steps

* Check [per-second pricing](/pricing) and included monthly usage credits.
* Read [Source Control Security](/docs/source-control-security) for details on self-hosted HTTPS and SSRF rules.

