codex-issue-auto-response.yml 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. name: Codex Issue Auto Response
  2. on:
  3. issues:
  4. types: [opened]
  5. jobs:
  6. auto-response:
  7. # 仅对有写入权限的用户运行
  8. if: |
  9. github.event.issue.author_association == 'OWNER' ||
  10. github.event.issue.author_association == 'MEMBER' ||
  11. github.event.issue.author_association == 'CONTRIBUTOR'
  12. runs-on: ubuntu-latest
  13. permissions:
  14. contents: read
  15. issues: write
  16. steps:
  17. - name: Checkout repository
  18. uses: actions/checkout@v5
  19. with:
  20. fetch-depth: 0
  21. - name: Run Codex for Issue Auto Response
  22. id: run_codex
  23. uses: openai/codex-action@v1
  24. env:
  25. GH_TOKEN: ${{ github.token }}
  26. GITHUB_TOKEN: ${{ github.token }}
  27. with:
  28. openai-api-key: ${{ secrets.OPENAI_API_KEY }}
  29. responses-api-endpoint: ${{ secrets.OPENAI_BASE_URL }}
  30. model: ${{ vars.OPENAI_MODEL || 'gpt-5.2' }}
  31. effort: ${{ vars.OPENAI_EFFORT || 'xhigh' }}
  32. sandbox: danger-full-access
  33. safety-strategy: drop-sudo
  34. prompt-file: .github/prompts/codex-issue-auto-response.md