Skip to content

Commit 45411f8

Browse files
committed
Add Env
1 parent 917d037 commit 45411f8

10 files changed

Lines changed: 5781 additions & 1530 deletions

File tree

README.md

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ An AI Agent that operates Claude Code on GitHub Actions. By using this action, y
1111
## Security
1212

1313
* **Permission Checks:** Before executing core logic, the action verifies if the triggering user (`github.context.actor`) has `write` or `admin` permissions for the repository.
14-
* **Sensitive Information Masking:** Any occurrences of the provided `github-token` and `anthropic-api-key` within the output posted to GitHub are automatically masked (replaced with `***`) to prevent accidental exposure.
14+
* **Sensitive Information Masking:** Any occurrences of the provided `github-token` and `anthropic-api-key`, `AWS Credentials` within the output posted to GitHub are automatically masked (replaced with `***`) to prevent accidental exposure.
1515

1616
## Usage
1717

@@ -58,6 +58,16 @@ jobs:
5858
with:
5959
github-token: ${{ secrets.GITHUB_TOKEN }}
6060
anthropic-api-key: ${{ secrets.ANTHROPIC_API_KEY }}
61+
# Optional settings
62+
# anthropic-base-url: "https://api.anthropic.com"
63+
# anthropic-model: "claude-3-7-sonnet-20250219"
64+
# anthropic-small-fast-model: "claude-3-5-haiku-20241022"
65+
# claude-code-use-bedrock: "1"
66+
# anthropic-bedrock-base-url: "https://bedrock-runtime.us-east-1.amazonaws.com"
67+
# aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
68+
# aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
69+
# aws-region: "us-east-1"
70+
# disable-prompt-caching: "1"
6171
```
6272

6373
## Example
@@ -83,3 +93,20 @@ Comment on an existing Pull Request to request code modifications:
8393
```
8494

8595
Claude will analyze the comment and add test code to the existing PR branch.
96+
97+
98+
## Advanced Configuration
99+
100+
You can customize the behavior of Claude Code using the following environment variables:
101+
102+
| Input Name | Description |
103+
|------------|-------------|
104+
| `anthropic-base-url` | Anthropic API base URL |
105+
| `anthropic-model` | Anthropic model to use |
106+
| `anthropic-small-fast-model` | Small and fast model for commit message generation etc. |
107+
| `claude-code-use-bedrock` | Use AWS Bedrock for Claude Code (0 or 1) |
108+
| `anthropic-bedrock-base-url` | Anthropic Bedrock API base URL |
109+
| `aws-access-key-id` | AWS Access Key ID (when using Bedrock) |
110+
| `aws-secret-access-key` | AWS Secret Access Key (when using Bedrock) |
111+
| `aws-region` | AWS region (when using Bedrock) |
112+
| `disable-prompt-caching` | Disable prompt caching (0 or 1) |

action.yml

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,33 @@ inputs:
1212
anthropic-api-key:
1313
description: 'Specify the Anthropic API Key'
1414
required: true
15+
anthropic-base-url:
16+
description: 'Specify the Anthropic API base URL'
17+
required: false
18+
anthropic-model:
19+
description: 'Specify the Anthropic model to use'
20+
required: false
21+
anthropic-small-fast-model:
22+
description: 'Specify the Anthropic small and fast model to use'
23+
required: false
24+
claude-code-use-bedrock:
25+
description: 'Use AWS Bedrock for Claude Code (0 or 1)'
26+
required: false
27+
anthropic-bedrock-base-url:
28+
description: 'Specify the Anthropic Bedrock API base URL'
29+
required: false
30+
aws-access-key-id:
31+
description: 'Specify the AWS Access Key ID for Bedrock'
32+
required: false
33+
aws-secret-access-key:
34+
description: 'Specify the AWS Secret Access Key for Bedrock'
35+
required: false
36+
aws-region:
37+
description: 'Specify the AWS region for Bedrock'
38+
required: false
39+
disable-prompt-caching:
40+
description: 'Disable prompt caching (0 or 1)'
41+
required: false
1542
event-path:
1643
description: 'Specify the path to the GitHub Event JSON file'
1744
default: ${{ github.event_path }}
@@ -24,5 +51,4 @@ inputs:
2451
runs:
2552
using: 'docker'
2653
image: 'Dockerfile.github_action_dockerhub'
27-
env:
28-
ANTHROPIC_API_KEY: ${{ inputs.anthropic-api-key }}
54+

0 commit comments

Comments
 (0)