|
68 | 68 | echo "/opt/homebrew/Cellar/swiftlint" >> "$GITHUB_PATH" || true |
69 | 69 | echo "/usr/local/Cellar/swiftlint" >> "$GITHUB_PATH" || true |
70 | 70 |
|
71 | | - # Set up LLM Agent |
72 | | - |
73 | | - - name: Install Agent (Homebrew) |
74 | | - run: brew install codex |
| 71 | + # Set up LLM Agent (via GitHub Action) |
75 | 72 |
|
76 | 73 | # Set up environment variables |
77 | 74 |
|
@@ -103,23 +100,23 @@ jobs: |
103 | 100 | working-directory: js |
104 | 101 | run: npm run doc |
105 | 102 |
|
106 | | - # Run the LLM Agent and commit the output |
| 103 | + # Run the LLM Agent and then commit the output |
107 | 104 |
|
108 | | - - name: Agent implement & commit |
| 105 | + - name: Run Codex Action |
| 106 | + uses: openai/codex-action@v1 |
109 | 107 | env: |
110 | 108 | OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} |
111 | 109 | GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
112 | 110 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
113 | | - CODEX_QUIET_MODE: "1" # suppress chatty logs |
| 111 | + with: |
| 112 | + openai_api_key: ${{ secrets.OPENAI_API_KEY }} |
| 113 | + prompt: | |
| 114 | + Implement ticket ${{ env.ISSUE_KEY }}: ${{ env.TITLE }}. ${{ env.DESC }} |
| 115 | +
|
| 116 | + - name: Commit changes |
114 | 117 | run: | |
115 | | - export PATH="/opt/homebrew/bin:/usr/local/bin:$PATH" |
116 | | - which swiftlint || true |
117 | | - swiftlint --version || true |
118 | | - export OPENAI_API_KEY="${{ secrets.OPENAI_API_KEY }}" |
119 | | - export GITHUB_TOKEN="${{ secrets.GITHUB_TOKEN }}" |
120 | | - codex exec --full-auto -c preferred_auth_method='"apikey"' "Implement ticket $ISSUE_KEY: $TITLE. $DESC" |
121 | 118 | git add -A |
122 | | - git commit -m "$ISSUE_KEY: $TITLE" |
| 119 | + git commit -m "$ISSUE_KEY: $TITLE" || echo "No changes to commit" |
123 | 120 |
|
124 | 121 | # Prepare and push Pull Request |
125 | 122 |
|
|
0 commit comments