A GitHub Action that installs and runs the Codex CLI with a prompt. Designed for self-hosted runners with ~/.codex/auth.json mounted into the container, so you can use your ChatGPT subscription instead of paying for API credits.
- uses: jsoncodes/codex-action@main
with:
prompt: "Review this code for bugs"
sandbox: danger-full-accessThe response is available via the response output:
- uses: jsoncodes/codex-action@main
id: codex
with:
prompt: ${{ steps.prompt.outputs.prompt }}
- run: echo "${{ steps.codex.outputs.response }}"| Name | Description | Required | Default |
|---|---|---|---|
prompt |
Prompt to pass to Codex | Yes | |
version |
Codex CLI version to install | No | latest |
model |
Model to use | No | |
sandbox |
Sandbox mode: workspace-write, read-only, or danger-full-access |
No | workspace-write |
| Name | Description |
|---|---|
response |
Raw output from codex exec |
- Node.js available on the runner
~/.codex/auth.jsonmounted into the runner (the action will fail fast if missing)