Skip to content

Commit b71b527

Browse files
committed
Switch Claude actions from OAuth token to API key auth
OAuth tokens expire periodically, requiring manual regeneration. API keys are stable and don't expire.
1 parent 3ab9898 commit b71b527

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

.github/workflows/claude-code-review.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
id: claude-review
3636
uses: anthropics/claude-code-action@v1
3737
with:
38-
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
38+
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
3939
prompt: |
4040
REPO: ${{ github.repository }}
4141
PR NUMBER: ${{ github.event.pull_request.number }}
@@ -54,4 +54,3 @@ jobs:
5454
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
5555
# or https://docs.claude.com/en/docs/claude-code/cli-reference for available options
5656
claude_args: '--allowed-tools "Bash(gh issue view:*),Bash(gh search:*),Bash(gh issue list:*),Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh pr list:*)"'
57-

.github/workflows/claude.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
id: claude
3535
uses: anthropics/claude-code-action@v1
3636
with:
37-
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
37+
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
3838

3939
# This is an optional setting that allows Claude to read CI results on PRs
4040
additional_permissions: |
@@ -47,4 +47,3 @@ jobs:
4747
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
4848
# or https://docs.claude.com/en/docs/claude-code/cli-reference for available options
4949
# claude_args: '--allowed-tools Bash(gh pr:*)'
50-

0 commit comments

Comments
 (0)