Metadata-Version: 2.1
Name: conmasd
Version: 0.1.4
Summary: GitHub Action Self-hosted Runner Operator for Docker
Author: Kyosuke Miyamura
Author-email: ask@386.jp
Requires-Python: >=3.11,<4.0
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: cryptography (>=42.0.5,<43.0.0)
Requires-Dist: docker (>=7.0.0,<8.0.0)
Requires-Dist: jwt (>=1.3.1,<2.0.0)
Requires-Dist: pydantic (>=2.6.4,<3.0.0)
Requires-Dist: python-dotenv (>=1.0.1,<2.0.0)
Requires-Dist: pyyaml (>=6.0.1,<7.0.0)
Requires-Dist: requests (>=2.31.0,<3.0.0)
Description-Content-Type: text/markdown

# conmasd

GitHub Action Self-hosted Runner Operator for Docker

## Usage

### Using Python file

Use `set_config()` to set config data, including credentials for GitHub App authentication, and execute with `run()` command.

```python
from conmasd import Conmasd

client = Conmasd()
client.set_config({
    "github": {
        "credentials": {
            "app_id": "YOUR_APP_ID_INT",
            "pem_dir": "/data/cert.pem",
            "installation_id": "YOUR_INSTALLATION_ID_INT"
        },
        "entity": "orgs",
        "place": "github",
    }
})

client.run()
```

### Using Docker Compose

Pass `docker.sock`, config file, and some other files required for creating runner to conmasd container.

`386jp/conmasd` image automatically reads `/data/config.json`. However, if you want to change config file path, pass file path to `CONFIG_FILE` environment variable.

```yaml
services:
  conmasd:
    image: 386jp/conmasd:latest
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - ./config.json:/data/config.json
      - ./cert.pem:/data/cert.pem
      - ./gha-baseimg-compose.yml:/data/gha-baseimg-compose.yml
```

If you gracefully shutdown your conmasd container, it automatically removes all the runners currently running.

