> For the complete documentation index, see [llms.txt](https://docs.bugbug.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bugbug.io/integrations/github.md).

# GitHub

Streamline your GitHub workflow with BugBug's seamless integration. Collaborate efficiently and track issues effortlessly. Try it now for free!

![](https://3168433179-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MKixgeBPbLvnD0l1eiV%2Fuploads%2FGQ9yQqBrF806pbfVfHJF%2FScreenshot%202022-04-12%20at%2011.23.14.png?alt=media\&token=63b9e3ff-656a-419c-8b24-4bcf31e7ca14)

Integrate with GitHub to streamline testing into your CI/CD pipeline, providing real-time feedback within your repository. Run tests and suites on BugBug Cloud to ensure that only high-quality, thoroughly tested code is deployed to production environments, reducing the risk of introducing regressions or bugs.

Currently, it is possible to integrate in two ways:

1. Using [official GitHub Action](#official-github-action) **(recommended)**
2. Via [BugBug Command Line Interface (CLI)](/integrations/cli.md)

## Official GitHub Action

GitHub Actions allows developers to create automated workflows directly within their GitHub repositories. Integrating with [BugBug Cloud Runner](https://github.com/marketplace/actions/bugbug-cloud-runner) lets them seamlessly incorporate testing into your CI/CD pipeline to receive instant feedback on test results and quickly identify issues.

{% hint style="warning" %}
Keep in mind that BugBug Cloud Runner is only available on the PRO and BUSINESS plans.\
More information about pricing can be found here: <https://bugbug.io/pricing/>
{% endhint %}

To add BugBug action to your workflow:

1. Go to the "Integrations" page
2. Find GitHub on the integrations list
3. Click on the "Manage" button
4. Continue by clicking on the "Open GitHub Action" button
5. Follow the instructions on [GitHub Marketplace](https://github.com/marketplace/actions/bugbug-cloud-runner) to add BugBug Cloud Runner to your .yml files

{% hint style="info" %}
Find your API token by following the instructions provided [here](/integrations/cli.md#get-your-api-token).

Discover your suite ID by referring to the information on this [page](/integrations/cli.md#find-your-suite-id).
{% endhint %}

### Use CLI in GitHub Actions

You can also use the BugBug CLI in a workflow.

```yaml
name: BugBug tests

on:
  push:
    branches:
      - main

jobs:
  e2e:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 24
      - run: npm install -g @bugbug-io/cli
      - run: bugbug --ci suites run <suite-id>
        env:
          BUGBUG_API_TOKEN: ${{ secrets.BUGBUG_API_TOKEN }}
```

Store the project API token as a GitHub Actions secret, for example `BUGBUG_API_TOKEN`. Do not commit it to the repository. OAuth login is recommended for local CLI use, but CI jobs should use a project token from the secret manager.

### Use Public API or incoming webhooks

Use the Public API if your workflow needs to list tests, start runs, stop runs, check statuses, or download reports programmatically.

Use incoming webhooks if GitHub only needs to trigger a test or suite with a single `POST` request.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.bugbug.io/integrations/github.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
