Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions .github/workflows/opencode-gpt-5-codex.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: opencode-gpt-5-codex

on:
issue_comment:
types: [created]
pull_request_review_comment:
types: [created]
issues:
types: [opened, edited]
pull_request_review:
types: [submitted]

jobs:
opencode:
timeout-minutes: 30 # to accommodate Codex's ability to run for extended periods
concurrency:
group: opencode-${{ github.event_name }}-${{ github.event.issue.number || github.event.pull_request.number || github.run_id }}
cancel-in-progress: true
if: |
(
github.event_name == 'issue_comment' &&
contains(github.event.comment.body, '/oc-codex') &&
contains(fromJson('["OWNER","MEMBER","COLLABORATOR"]'), github.event.comment.author_association)
) || (
github.event_name == 'pull_request_review_comment' &&
contains(github.event.comment.body, '/oc-codex') &&
contains(fromJson('["OWNER","MEMBER","COLLABORATOR"]'), github.event.comment.author_association)
) || (
github.event_name == 'pull_request_review' &&
github.event.review.body != null &&
contains(github.event.review.body, '/oc-codex') &&
contains(fromJson('["OWNER","MEMBER","COLLABORATOR"]'), github.event.review.author_association)
) || (
github.event_name == 'issues' &&
(
(github.event.issue.body != null && contains(github.event.issue.body, '/oc-codex')) ||
contains(github.event.issue.title, '/oc-codex')
) &&
contains(fromJson('["OWNER","MEMBER","COLLABORATOR"]'), github.event.issue.author_association)
)
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Run opencode
# They are moving fast at https://github.com/sst/opencode/releases, so pinning the version isn't practical yet. We'll keep it at `latest` for now and monitor the changes for a stable version. Latest version as of this writing is `v0.15.3`.
uses: sst/opencode/github@latest
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY_FOR_OPENCODE }}
with:
model: openai/gpt-5-codex