mirror of
https://github.com/anthropics/claude-code-action.git
synced 2026-01-23 23:14:13 +08:00
Compare commits
16 Commits
lina/html_
...
v0.0.7
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8e84799f37 | ||
|
|
57ae256d38 | ||
|
|
d3bb4afed5 | ||
|
|
17cc868124 | ||
|
|
d822994da0 | ||
|
|
b129b800c5 | ||
|
|
80dbb4a5aa | ||
|
|
1e9ea49f7a | ||
|
|
08e084156a | ||
|
|
e67f992a13 | ||
|
|
be7f75d65a | ||
|
|
e3d126d058 | ||
|
|
11f5812e28 | ||
|
|
d15de3a8e3 | ||
|
|
9e23f6d9ed | ||
|
|
48b327f164 |
18
README.md
18
README.md
@@ -1,3 +1,5 @@
|
|||||||
|

|
||||||
|
|
||||||
# Claude Code Action
|
# Claude Code Action
|
||||||
|
|
||||||
A general-purpose [Claude Code](https://claude.ai/code) action for GitHub PRs and issues that can answer questions and implement code changes. This action listens for a trigger phrase in comments and activates Claude act on the request. It supports multiple authentication methods including Anthropic direct API, Amazon Bedrock, and Google Vertex AI.
|
A general-purpose [Claude Code](https://claude.ai/code) action for GitHub PRs and issues that can answer questions and implement code changes. This action listens for a trigger phrase in comments and activates Claude act on the request. It supports multiple authentication methods including Anthropic direct API, Amazon Bedrock, and Google Vertex AI.
|
||||||
@@ -64,12 +66,13 @@ jobs:
|
|||||||
## Inputs
|
## Inputs
|
||||||
|
|
||||||
| Input | Description | Required | Default |
|
| Input | Description | Required | Default |
|
||||||
| --------------------- | -------------------------------------------------------------------------------------------------------------------- | -------- | ---------------------------- |
|
| --------------------- | -------------------------------------------------------------------------------------------------------------------- | -------- | --------- |
|
||||||
| `anthropic_api_key` | Anthropic API key (required for direct API, not needed for Bedrock/Vertex) | No\* | - |
|
| `anthropic_api_key` | Anthropic API key (required for direct API, not needed for Bedrock/Vertex) | No\* | - |
|
||||||
| `direct_prompt` | Direct prompt for Claude to execute automatically without needing a trigger (for automated workflows) | No | - |
|
| `direct_prompt` | Direct prompt for Claude to execute automatically without needing a trigger (for automated workflows) | No | - |
|
||||||
| `timeout_minutes` | Timeout in minutes for execution | No | `30` |
|
| `timeout_minutes` | Timeout in minutes for execution | No | `30` |
|
||||||
| `github_token` | GitHub token for Claude to operate with. **Only include this if you're connecting a custom GitHub app of your own!** | No | - |
|
| `github_token` | GitHub token for Claude to operate with. **Only include this if you're connecting a custom GitHub app of your own!** | No | - |
|
||||||
| `anthropic_model` | Model to use (provider-specific format required for Bedrock/Vertex) | No | `claude-3-7-sonnet-20250219` |
|
| `model` | Model to use (provider-specific format required for Bedrock/Vertex) | No | - |
|
||||||
|
| `anthropic_model` | **DEPRECATED**: Use `model` instead. Kept for backward compatibility. | No | - |
|
||||||
| `use_bedrock` | Use Amazon Bedrock with OIDC authentication instead of direct Anthropic API | No | `false` |
|
| `use_bedrock` | Use Amazon Bedrock with OIDC authentication instead of direct Anthropic API | No | `false` |
|
||||||
| `use_vertex` | Use Google Vertex AI with OIDC authentication instead of direct Anthropic API | No | `false` |
|
| `use_vertex` | Use Google Vertex AI with OIDC authentication instead of direct Anthropic API | No | `false` |
|
||||||
| `allowed_tools` | Additional tools for Claude to use (the base GitHub tools will always be included) | No | "" |
|
| `allowed_tools` | Additional tools for Claude to use (the base GitHub tools will always be included) | No | "" |
|
||||||
@@ -255,7 +258,7 @@ Use a specific Claude model:
|
|||||||
```yaml
|
```yaml
|
||||||
- uses: anthropics/claude-code-action@beta
|
- uses: anthropics/claude-code-action@beta
|
||||||
with:
|
with:
|
||||||
anthropic_model: "claude-3-7-sonnet-20250219"
|
# model: "claude-3-5-sonnet-20241022" # Optional: specify a different model
|
||||||
# ... other inputs
|
# ... other inputs
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -283,21 +286,20 @@ Use provider-specific model names based on your chosen provider:
|
|||||||
# For direct Anthropic API (default)
|
# For direct Anthropic API (default)
|
||||||
- uses: anthropics/claude-code-action@beta
|
- uses: anthropics/claude-code-action@beta
|
||||||
with:
|
with:
|
||||||
anthropic_model: "claude-3-7-sonnet-20250219"
|
|
||||||
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
|
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
|
||||||
# ... other inputs
|
# ... other inputs
|
||||||
|
|
||||||
# For Amazon Bedrock with OIDC
|
# For Amazon Bedrock with OIDC
|
||||||
- uses: anthropics/claude-code-action@beta
|
- uses: anthropics/claude-code-action@beta
|
||||||
with:
|
with:
|
||||||
anthropic_model: "anthropic.claude-3-7-sonnet-20250219-beta:0" # Cross-region inference
|
model: "anthropic.claude-3-7-sonnet-20250219-beta:0" # Cross-region inference
|
||||||
use_bedrock: "true"
|
use_bedrock: "true"
|
||||||
# ... other inputs
|
# ... other inputs
|
||||||
|
|
||||||
# For Google Vertex AI with OIDC
|
# For Google Vertex AI with OIDC
|
||||||
- uses: anthropics/claude-code-action@beta
|
- uses: anthropics/claude-code-action@beta
|
||||||
with:
|
with:
|
||||||
anthropic_model: "claude-3-7-sonnet@20250219"
|
model: "claude-3-7-sonnet@20250219"
|
||||||
use_vertex: "true"
|
use_vertex: "true"
|
||||||
# ... other inputs
|
# ... other inputs
|
||||||
```
|
```
|
||||||
@@ -323,7 +325,7 @@ Both AWS Bedrock and GCP Vertex AI require OIDC authentication.
|
|||||||
|
|
||||||
- uses: anthropics/claude-code-action@beta
|
- uses: anthropics/claude-code-action@beta
|
||||||
with:
|
with:
|
||||||
anthropic_model: "anthropic.claude-3-7-sonnet-20250219-beta:0"
|
model: "anthropic.claude-3-7-sonnet-20250219-beta:0"
|
||||||
use_bedrock: "true"
|
use_bedrock: "true"
|
||||||
# ... other inputs
|
# ... other inputs
|
||||||
|
|
||||||
@@ -348,7 +350,7 @@ Both AWS Bedrock and GCP Vertex AI require OIDC authentication.
|
|||||||
|
|
||||||
- uses: anthropics/claude-code-action@beta
|
- uses: anthropics/claude-code-action@beta
|
||||||
with:
|
with:
|
||||||
anthropic_model: "claude-3-7-sonnet@20250219"
|
model: "claude-3-7-sonnet@20250219"
|
||||||
use_vertex: "true"
|
use_vertex: "true"
|
||||||
# ... other inputs
|
# ... other inputs
|
||||||
|
|
||||||
|
|||||||
10
action.yml
10
action.yml
@@ -14,10 +14,12 @@ inputs:
|
|||||||
required: false
|
required: false
|
||||||
|
|
||||||
# Claude Code configuration
|
# Claude Code configuration
|
||||||
anthropic_model:
|
model:
|
||||||
description: "Model to use (provider-specific format required for Bedrock/Vertex)"
|
description: "Model to use (provider-specific format required for Bedrock/Vertex)"
|
||||||
required: false
|
required: false
|
||||||
default: "claude-3-7-sonnet-20250219"
|
anthropic_model:
|
||||||
|
description: "DEPRECATED: Use 'model' instead. Model to use (provider-specific format required for Bedrock/Vertex)"
|
||||||
|
required: false
|
||||||
allowed_tools:
|
allowed_tools:
|
||||||
description: "Additional tools for Claude to use (the base GitHub tools will always be included)"
|
description: "Additional tools for Claude to use (the base GitHub tools will always be included)"
|
||||||
required: false
|
required: false
|
||||||
@@ -98,14 +100,14 @@ runs:
|
|||||||
allowed_tools: ${{ env.ALLOWED_TOOLS }}
|
allowed_tools: ${{ env.ALLOWED_TOOLS }}
|
||||||
disallowed_tools: ${{ env.DISALLOWED_TOOLS }}
|
disallowed_tools: ${{ env.DISALLOWED_TOOLS }}
|
||||||
timeout_minutes: ${{ inputs.timeout_minutes }}
|
timeout_minutes: ${{ inputs.timeout_minutes }}
|
||||||
anthropic_model: ${{ inputs.anthropic_model }}
|
model: ${{ inputs.model || inputs.anthropic_model }}
|
||||||
mcp_config: ${{ steps.prepare.outputs.mcp_config }}
|
mcp_config: ${{ steps.prepare.outputs.mcp_config }}
|
||||||
use_bedrock: ${{ inputs.use_bedrock }}
|
use_bedrock: ${{ inputs.use_bedrock }}
|
||||||
use_vertex: ${{ inputs.use_vertex }}
|
use_vertex: ${{ inputs.use_vertex }}
|
||||||
anthropic_api_key: ${{ inputs.anthropic_api_key }}
|
anthropic_api_key: ${{ inputs.anthropic_api_key }}
|
||||||
env:
|
env:
|
||||||
# Model configuration
|
# Model configuration
|
||||||
ANTHROPIC_MODEL: ${{ inputs.anthropic_model }}
|
ANTHROPIC_MODEL: ${{ inputs.model || inputs.anthropic_model }}
|
||||||
GITHUB_TOKEN: ${{ steps.prepare.outputs.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ steps.prepare.outputs.GITHUB_TOKEN }}
|
||||||
|
|
||||||
# AWS configuration
|
# AWS configuration
|
||||||
|
|||||||
BIN
src/.DS_Store
vendored
Normal file
BIN
src/.DS_Store
vendored
Normal file
Binary file not shown.
Reference in New Issue
Block a user