opencode.yml 783 B

12345678910111213141516171819202122232425262728293031
  1. name: opencode
  2. on:
  3. issue_comment:
  4. types: [created]
  5. jobs:
  6. opencode:
  7. if: |
  8. (contains(github.event.comment.body, '/oc') ||
  9. contains(github.event.comment.body, '/opencode')) &&
  10. (github.event.comment.author_association == 'OWNER' ||
  11. github.event.comment.author_association == 'MEMBER')
  12. runs-on: ubuntu-latest
  13. permissions:
  14. id-token: write
  15. contents: write
  16. pull-requests: write
  17. issues: write
  18. steps:
  19. - name: Checkout repository
  20. uses: actions/checkout@v4
  21. with:
  22. fetch-depth: 1
  23. - name: Run opencode
  24. uses: sst/opencode/github@latest
  25. env:
  26. ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
  27. with:
  28. model: anthropic/claude-sonnet-4-20250514