-
Notifications
You must be signed in to change notification settings - Fork 125
72 lines (67 loc) · 2.68 KB
/
claude.yml
File metadata and controls
72 lines (67 loc) · 2.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: Claude PR Assistant
on:
issue_comment:
types: [created]
pull_request_review_comment:
types: [created]
issues:
types: [opened, assigned]
pull_request_review:
types: [submitted]
jobs:
claude-code-action:
if: |
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
(github.event_name == 'issues' && contains(github.event.issue.body, '@claude'))
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
issues: read
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1
# node is needed for vitest and other tools
- name: Setup Node.js 22
uses: actions/setup-node@v4
with:
node-version: "22"
- name: Setup Alchemy Environment
uses: ./.github/actions/setup-alchemy
with:
aws-role-arn: ${{ secrets.AWS_ROLE_ARN }}
aws-region: us-west-2
- name: Run Claude PR Action
uses: anthropics/claude-code-action@beta
with:
allowed_tools: "Bash(bun:*)"
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
timeout_minutes: "60"
env:
# Set all the same environment variables that tests use
CI: true
ALCHEMY_STATE_STORE: cloudflare
AWS_REGION: us-west-2
BRANCH_PREFIX: claude-${{ github.event_name == 'pull_request' && github.event.pull_request.number || github.ref_name }}
# All secrets loaded from SSM parameter via setup-alchemy action
ALCHEMY_PASSWORD: ${{ env.ALCHEMY_PASSWORD }}
CLOUDFLARE_ACCOUNT_ID: ${{ env.CLOUDFLARE_ACCOUNT_ID }}
CLOUDFLARE_API_KEY: ${{ env.CLOUDFLARE_API_KEY }}
CLOUDFLARE_BUCKET_NAME: ${{ env.CLOUDFLARE_BUCKET_NAME }}
CLOUDFLARE_EMAIL: ${{ env.CLOUDFLARE_EMAIL }}
OPENAI_API_KEY: ${{ env.OPENAI_API_KEY }}
R2_ACCESS_KEY_ID: ${{ env.R2_ACCESS_KEY_ID }}
R2_SECRET_ACCESS_KEY: ${{ env.R2_SECRET_ACCESS_KEY }}
STRIPE_API_KEY: ${{ env.STRIPE_API_KEY }}
NEON_API_KEY: ${{ env.NEON_API_KEY }}
SECRET_PASSPHRASE: ${{ env.SECRET_PASSPHRASE }}
UPSTASH_API_KEY: ${{ env.UPSTASH_API_KEY }}
UPSTASH_EMAIL: sam@alchemy.run
SENTRY_AUTH_TOKEN: ${{ env.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: ${{ env.SENTRY_ORG }}
VERCEL_ACCESS_TOKEN: ${{ env.VERCEL_ACCESS_TOKEN }}