Octri

GitHub Actions

Push your OpenAPI spec to Octri from CI with the Octri GitHub Action. Every merge that changes the spec republishes your docs, MCP server and changelog, and can build your SDKs in the same run.

The action is OctriDev/octri-action. It runs the Octri CLI, waits for the spec to finish processing, and fails the step if it doesn't.

Set it up

  1. Create an API key

    Create an Octri API key under Settings, API keys, and store it in your repository as the OCTRI_API_KEY secret. See API keys.

  2. Add the project ID

    Store the project's ID as the OCTRI_PROJECT_ID repository variable. The project's GitHub Actions card on the Integrations page shows it, and so does octri projects list.

  3. Add the workflow

    Commit this as .github/workflows/octri.yml, with your spec's path:

    yaml
    name: Publish API
    on:
      push:
        branches: [main]
        paths: [openapi.yaml]
    
    jobs:
      octri:
        runs-on: ubuntu-latest
        steps:
          - uses: actions/checkout@v4
          - uses: OctriDev/octri-action@v1
            with:
              api-key: ${{ secrets.OCTRI_API_KEY }}
              project-id: ${{ vars.OCTRI_PROJECT_ID }}
              spec: openapi.yaml

The paths filter keeps the workflow from running when nothing in the spec changed.

Inputs

api-keystringrequired

An Octri API key. Pass it from a secret, never as plain text.

project-idstringrequired

The project the spec belongs to.

specpathrequired

The spec's path from the repository root, YAML or JSON.

build-sdksbooleandefault: false

Also build the SDKs once the spec is in. The step fails if any language fails. See builds.

cli-versionstringdefault: 1.0.8

The @octri/cli version to run. Pin it to keep a CLI release from changing your pipeline unannounced.

Other CI systems

The action is a thin wrapper around two CLI commands, octri specs push and octri sdk build, so any CI that runs Node can do the same. See CI setup.

To keep the spec in a repository that Octri watches itself, with no workflow to maintain, use GitHub sync instead.