---
title: GitHub CI
icon: circle-play
description: Set up the GitHub CI resource in Python.
---

## Dependencies

No additional dependencies - uses `aiohttp` (included).

For credential setup, see the [GitHub CI Setup](/home/setup/github_ci) guide.

## Configuration

```python
import os
from mirage import Workspace, MountMode
from mirage.resource.github_ci import GitHubCIConfig, GitHubCIResource

config = GitHubCIConfig(
    token=os.environ["GITHUB_TOKEN"],
    owner="my-org",
    repo="my-repo",
)
resource = GitHubCIResource(config=config)
ws = Workspace({"/ci": resource}, mode=MountMode.READ)
```

## Config Reference

| Field   | Required | Default | Description                         |
| ------- | -------- | ------- | ----------------------------------- |
| `token` | Yes      |         | GitHub Personal Access Token        |
| `owner` | Yes      |         | Repository owner (user or org)      |
| `repo`  | Yes      |         | Repository name                     |
| `days`  | No       | 30      | Time window for listing recent runs |
