You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| `openai-api-key` | Secret used to start the Responses API proxy when you are using OpenAI (default). Store it in `secrets`. | `""` |
96
98
| `responses-api-endpoint` | Optional Responses API endpoint override, e.g. `https://example.openai.azure.com/openai/v1/responses`. Leave empty to use the proxy's default. | `""` |
99
+
| `codex-auth-json-b64` | Base64-encoded contents of `auth.json` for Codex CLI (ChatGPT subscription auth). The action decodes and writes it to `CODEX_HOME/auth.json`. | `""` |
97
100
| `prompt` | Inline prompt text. Provide this or `prompt-file`. | `""` |
98
101
| `prompt-file` | Path (relative to the repository root) of a file that contains the prompt. Provide this or `prompt`. | `""` |
99
102
| `output-file` | File where the final Codex message is written. Leave empty to skip writing a file. | `""` |
@@ -169,6 +172,39 @@ Ultimately, your configured Action might look something like the following:
169
172
prompt: "Debug all the things."
170
173
```
171
174
175
+
### Using ChatGPT subscription auth
176
+
177
+
If you already have a Codex login on a developer machine, you can export your CLI credentials and provide them to this action via a base64-encoded `auth.json`:
178
+
179
+
1. On a trusted machine where `codex` is logged in, find `auth.json` under `~/.codex/auth.json`.
180
+
2. Base64-encode it and save into a GitHub secret:
181
+
182
+
Linux/macOS:
183
+
184
+
```bash
185
+
base64 -w0 ~/.codex/auth.json
186
+
```
187
+
188
+
macOS (BSD base64):
189
+
190
+
```bash
191
+
base64 -i ~/.codex/auth.json | tr -d '\n'
192
+
```
193
+
194
+
3. In your workflow, pass the secret to the action:
- Do not provide both `openai-api-key` and `codex-auth-json-b64` unless you specifically want to use the Responses API proxy; if both are present, the proxy configuration takes precedence.
206
+
- `auth.json` is sensitive. This action writes it with file mode `0600`. Prefer `safety-strategy: drop-sudo` or `unprivileged-user` to limit risk.
207
+
172
208
## Version History
173
209
174
210
See the [`CHANGELOG`](./CHANGELOG.md) for details.
Copy file name to clipboardExpand all lines: action.yml
+29-3Lines changed: 29 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -22,6 +22,10 @@ inputs:
22
22
description: "Optional Responses API endpoint override, e.g. https://example.openai.azure.com/openai/v1/responses. Defaults to the proxy's built-in endpoint when empty."
23
23
required: false
24
24
default: ""
25
+
codex-auth-json-b64:
26
+
description: "Base64-encoded contents of Codex auth.json (ChatGPT subscription auth)."
27
+
required: false
28
+
default: ""
25
29
working-directory:
26
30
description: "Working directory that Codex should use. Defaults to the repository root."
0 commit comments