codex-argsでconfigを上書きする形で設定します。
name: E2E Report
on:
workflow_dispatch:
jobs:
codex:
runs-on: ubuntu-latest
outputs:
final_message: ${{ steps.run_codex.outputs.final-message }}
steps:
- name: Install MCP Server
run: npm install -g chrome-devtools-mcp@latest
- name: Run Codex
id: run_codex
uses: openai/codex-action@v1
with:
openai-api-key: ${{ secrets.OPENAI_API_KEY }}
codex-args: |
--config mcp_servers={'devtools'={'command'='chrome-devtools-mcp','args'=['--headless=true','--isolated=true']}}
prompt: |
1. chrome-devtoolsを開始する
2. `https://subsidy-search-app.vercel.app`にアクセスする
3. 自律的にスクロールを行い、ページの内容を理解すること
4. 入力やクリックを行い、テストを行うこと
5. 常にコンソールエラーが出ていないか注視すること
6. テストが完了したらユーザーにフィードバックをする
create_issue:
runs-on: ubuntu-latest
needs: codex
if: needs.codex.outputs.final_message != ''
permissions:
issues: write
pull-requests: write
steps:
- name: Create Report Issue
env:
GH_TOKEN: ${{ github.token }}
REPO: ${{ github.repository }}
CODEX_FINAL_MESSAGE: ${{ needs.codex.outputs.final_message }}
run: gh issue create --title "E2Eレポート" --body "$CODEX_FINAL_MESSAGE" --repo "$REPO"
参考