actions-marketplace-validations/Codex Action for OpenAI-Compatible APIs

Run `codex exec` with OpenAI-compatible API endpoints.

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Maintainedlast commit Nov 19, 2025
License
Apache 2.0

Pinned Snippet

workflow.ymlSHA-pinned
uses: actions-marketplace-validations/assahbismarkabah_codex-action@9d61b3fa8720e577da290323ab9d91436f372b98 # no releases — HEAD as of 2026-07-13

tags can be moved; commit SHAs can't. why a SHA?

namedescriptionrequireddefault
promptPrompt to pass to Codex. `prompt` or `prompt-file` must be provided.no""
prompt-filePath to file that contains the prompt to pass to Codex. `prompt` or `prompt-file` must be provided.no""
output-fileFile where the final Codex message is written. Leave empty to skip writing a file.no""
api-keyAPI key for OpenAI-compatible endpoints (e.g., OpenAI, Kimi, Fireworks). Can also be used for custom OpenAPI-compatible endpoints.no""
api-base-urlBase 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""
modelModel name to use with the API endpoint (e.g., gpt-3.5-turbo, kimi-k2-instruct). Required when using custom endpoints.no""
working-directoryWorking directory that Codex should use. Defaults to the repository root.no""
sandboxSandbox mode for Codex. One of `workspace-write` (default), `read-only` or `danger-full-access`. noworkspace-write
codex-versionVersion of `@openai/codex` to install.no""
codex-argsAdditional 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-schemaInline schema contents to use with `codex exec --output-schema`.no""
output-schema-fileFile path to the schema that should be passed to `codex exec --output-schema`.no""
codex-homeDirectory to use as the Codex home directory. If empty, the default Codex home directory will be used.no""
safety-strategySpecify 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. nodrop-sudo
codex-userIf `safety-strategy` is set to `unprivileged-user`, this specifies the UNIX username to run Codex as.no""
allow-usersComma-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-botsAllow runs triggered by GitHub Apps/bot accounts to bypass the write-access check.nofalse
namedescription
final-messageRaw output emitted by `codex exec`.
output-file-pathPath to the file containing the final message from `codex exec`.