Skip to content

Commit ba7462e

Browse files
committed
fix: update Claude dispatch workflow to match original gist exactly
- Change trigger type from 'claude' to 'claude-dispatch' - Update action version from @beta to @eap - Add remote-agent mode configuration - Include anthropic_api_key option alongside existing oauth token - Add id-token write permission - Include fetch-depth: 1 for checkout - Add preliminary setup section - Update job name to 'claude-dispatch' - Add comprehensive documentation comments
1 parent 58e5766 commit ba7462e

File tree

1 file changed

+32
-18
lines changed

1 file changed

+32
-18
lines changed
Lines changed: 32 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,50 @@
1-
name: Claude Dispatch
1+
# IMPORTANT: Do not move this file in your repo! Make sure it's located at .github/workflows/claude-dispatch.yml
2+
3+
name: Claude Code Dispatch
4+
5+
# IMPORTANT: Do not modify this `on` section!
26

37
on:
48
repository_dispatch:
5-
types: [claude]
9+
types: [claude-dispatch]
610

711
jobs:
8-
claude:
12+
claude-dispatch:
913
runs-on: ubuntu-latest
1014
permissions:
1115
contents: write
1216
pull-requests: write
1317
issues: write
18+
id-token: write
1419
steps:
1520
- name: Checkout repository
1621
uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 1
24+
25+
# - name: Preliminary Setup
26+
# run: |
27+
# echo "Setting up environment..."
28+
# # Add any preliminary setup commands here to setup Claude's dev environment
29+
# # e.g., npm install, etc.
1730

1831
- name: Run Claude Code
19-
uses: anthropics/claude-code-action@beta
32+
id: claude
33+
uses: anthropics/claude-code-action@eap
2034
with:
21-
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
22-
# Optional: customize model (defaults to Claude Sonnet 4)
35+
mode: 'remote-agent'
36+
# Optional: Specify an API key, otherwise we'll use your Claude account automatically
37+
# anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
38+
39+
# Optional: Specify model (defaults to Claude Sonnet 4, uncomment for Claude Opus 4)
2340
# model: "claude-opus-4-20250514"
24-
25-
# Optional: allow specific development commands
26-
# allowed_tools: "Bash(terraform fmt),Bash(terraform validate),Bash(go test ./...)"
27-
28-
# Optional: custom instructions for Claude
29-
# custom_instructions: |
30-
# Follow Terraform best practices
31-
# Ensure all changes are validated and formatted
32-
# Run tests before submitting changes
33-
34-
# Optional: environment variables
41+
42+
# Optional: Allow Claude to run specific commands
43+
# allowed_tools: |
44+
# Bash(npm run lint)
45+
# Bash(npm run test)
46+
# Bash(npm run build)
47+
48+
# Optional: Custom environment variables for Claude
3549
# claude_env: |
36-
# TF_IN_AUTOMATION: true
50+
# NODE_ENV: test

0 commit comments

Comments
 (0)