-
Notifications
You must be signed in to change notification settings - Fork 3
41 lines (35 loc) · 1.3 KB
/
Copy pathclaude.yml
File metadata and controls
41 lines (35 loc) · 1.3 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
name: Claude Code
on:
workflow_dispatch:
inputs:
prompt:
description: "Prompt for Claude Code"
required: true
type: string
jobs:
claude:
runs-on: ubuntu-latest
permissions:
contents: write # Allow creating branches/commits
pull-requests: write # Allow pushing to PR branches
issues: write # Allow updating issue comments
id-token: write
actions: read # Required for Claude to read CI results on PRs
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 0 # Full history for git operations
- name: Run Claude Code
id: claude
uses: anthropics/claude-code-action@v1
with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
# This is an optional setting that allows Claude to read CI results on PRs
additional_permissions: |
actions: read
prompt: ${{ inputs.prompt }}
# Optional: Add claude_args to customize behavior and configuration
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
# or https://code.claude.com/docs/en/cli-reference for available options
# claude_args: '--allowed-tools Bash(gh pr:*)'