Skip to content

Commit e94fb84

Browse files
Add Claude Code PR runner workflow on Depot
1 parent 2a278f2 commit e94fb84

File tree

2 files changed

+54
-0
lines changed

2 files changed

+54
-0
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Claude Code PR Runner
2+
3+
on:
4+
issue_comment:
5+
types:
6+
- created
7+
pull_request_review_comment:
8+
types:
9+
- created
10+
pull_request_review:
11+
types:
12+
- submitted
13+
workflow_dispatch:
14+
15+
permissions:
16+
contents: write
17+
pull-requests: write
18+
issues: write
19+
actions: read
20+
id-token: write
21+
22+
jobs:
23+
claude-pr-runner:
24+
if: |
25+
github.event_name == 'workflow_dispatch' ||
26+
(github.event_name == 'issue_comment' &&
27+
github.event.issue.pull_request &&
28+
contains(github.event.comment.body, '@claude')) ||
29+
(github.event_name == 'pull_request_review_comment' &&
30+
contains(github.event.comment.body, '@claude')) ||
31+
(github.event_name == 'pull_request_review' &&
32+
contains(github.event.review.body, '@claude'))
33+
runs-on: depot-ubuntu-24.04
34+
steps:
35+
- name: Checkout
36+
uses: actions/checkout@v4
37+
with:
38+
fetch-depth: 1
39+
40+
- name: Run Claude Code Action
41+
uses: anthropics/claude-code-action@v1
42+
with:
43+
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
44+
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
45+
additional_permissions: |
46+
actions: read

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,14 @@ Windows smoke test:
3939
- GitHub Actions workflow: `.github/workflows/ci.yml`
4040
- Runner target: Depot-hosted runner label `depot-ubuntu-24.04`
4141

42+
## Claude PR Runner
43+
- Workflow: `.github/workflows/claude-pr-runner.yml`
44+
- Trigger: mention `@claude` in PR comments/reviews (or run manually via `workflow_dispatch`)
45+
- Runner target: Depot-hosted runner label `depot-ubuntu-24.04`
46+
- Configure one auth secret:
47+
- `ANTHROPIC_API_KEY` (API key mode), or
48+
- `CLAUDE_CODE_OAUTH_TOKEN` (OAuth mode)
49+
4250
Supported tool IDs:
4351
- `codex`
4452
- `claude`

0 commit comments

Comments
 (0)