Skip to content

Commit 1fa314e

Browse files
committed
add github action
1 parent 9f87ad0 commit 1fa314e

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

.github/workflows/run-codex.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Run Codex Agent
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
prompt:
6+
description: 'Command string for Codex'
7+
required: true
8+
type: string
9+
10+
jobs:
11+
codex_job:
12+
runs-on: ubuntu-latest
13+
environment:
14+
name: OpenAI
15+
steps:
16+
- name: Check out code
17+
uses: actions/checkout@v4
18+
19+
- name: Install Codex CLI
20+
run: |
21+
npm install -g @openai/codex@native
22+
- name: Run Codex with prompt
23+
env:
24+
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
25+
run: |
26+
codex exec "${{ github.event.inputs.prompt }}"
27+
echo "Codex execution completed"

0 commit comments

Comments
 (0)