actions-marketplace-validations/Codex Action for OpenAI-Compatible APIs
Run `codex exec` with OpenAI-compatible API endpoints.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Maintainedlast commit Nov 19, 2025
- License
- Apache 2.0
Pinned Snippet
uses: actions-marketplace-validations/assahbismarkabah_codex-action@9d61b3fa8720e577da290323ab9d91436f372b98 # no releases — HEAD as of 2026-07-13tags can be moved; commit SHAs can't. why a SHA?
Inputs
| name | description | required | default |
|---|---|---|---|
| prompt | Prompt to pass to Codex. `prompt` or `prompt-file` must be provided. | no | "" |
| prompt-file | Path to file that contains the prompt to pass to Codex. `prompt` or `prompt-file` must be provided. | no | "" |
| output-file | File where the final Codex message is written. Leave empty to skip writing a file. | no | "" |
| api-key | API key for OpenAI-compatible endpoints (e.g., OpenAI, Kimi, Fireworks). Can also be used for custom OpenAPI-compatible endpoints. | no | "" |
| api-base-url | Base URL for OpenAI-compatible API endpoint (e.g., https://api.openai.com/v1, https://api.moonshot.cn/v1). If provided, uses direct API calls instead of proxy. | no | "" |
| model | Model name to use with the API endpoint (e.g., gpt-3.5-turbo, kimi-k2-instruct). Required when using custom endpoints. | no | "" |
| working-directory | Working directory that Codex should use. Defaults to the repository root. | no | "" |
| sandbox | Sandbox mode for Codex. One of `workspace-write` (default), `read-only` or `danger-full-access`. | no | workspace-write |
| codex-version | Version of `@openai/codex` to install. | no | "" |
| codex-args | Additional args to pass through to `codex exec`. If this value starts with `[`, it will be parsed as a JSON array; otherwise, it will be parsed as a shell-like string. | no | "" |
| output-schema | Inline schema contents to use with `codex exec --output-schema`. | no | "" |
| output-schema-file | File path to the schema that should be passed to `codex exec --output-schema`. | no | "" |
| codex-home | Directory to use as the Codex home directory. If empty, the default Codex home directory will be used. | no | "" |
| safety-strategy | Specify one of the following options (on Windows, the only supported option is `unsafe`): * `drop-sudo` (default, IRREVERSIBLE) Drop sudo privileges (if any) from the default user before running Codex, and run Codex as that user. This is only supported on Linux and macOS runners. This option is irreversible: if the default user has sudo privileges, they will be removed permanently for the duration of the job. * `unprivileged-user` Run Codex as the specified user specified by the `codex-user` option (the user must already exist). Note the caller is responsible for ensuring the specified user has the privileges it needs to perform the requested actions. For example, the copy of the repo created by `actions/checkout` is not world-readable by default. * `read-only` Run Codex in a sandbox that can read any file on disk, but cannot write to disk or access the network. Note Codex will still run as the default user for this Action, which likely has sudo privileges, so it could read `openai-api-key` from memory and reveal it by printing it to the output of the GitHub Action. * `unsafe` (NOT RECOMMENDED) Do not try to restrict Codex's privileges at all. This is extremely dangerous, as the default user for this Action likely has sudo privileges, which means it can read secrets stored in memory (such as the value of the API key) and print them to the output of the GitHub Action or exfiltrate them in other ways. | no | drop-sudo |
| codex-user | If `safety-strategy` is set to `unprivileged-user`, this specifies the UNIX username to run Codex as. | no | "" |
| allow-users | Comma-separated list of GitHub usernames who can run this action, or '*' to allow all users. Note users who have write access to the GitHub repo have access by default and do not need to be listed here. | no | "" |
| allow-bots | Allow runs triggered by GitHub Apps/bot accounts to bypass the write-access check. | no | false |
Outputs
| name | description |
|---|---|
| final-message | Raw output emitted by `codex exec`. |
| output-file-path | Path to the file containing the final message from `codex exec`. |