Fix OAuth authentication by using claude_code_oauth_token parameter
- Extract access token from credentials JSON in prepare.ts - Pass token to base action via claude_code_oauth_token parameter - Remove unused OAuth setup code and CLAUDE_CREDENTIALS env var - This uses the official base action's OAuth support correctly
This commit is contained in:
@@ -109,7 +109,6 @@ runs:
|
||||
GITEA_API_URL: ${{ env.GITHUB_SERVER_URL }}
|
||||
# Only set ANTHROPIC_API_KEY if not using OAuth
|
||||
ANTHROPIC_API_KEY: ${{ inputs.anthropic_api_key != 'use-oauth' && inputs.anthropic_api_key || '' }}
|
||||
CLAUDE_CREDENTIALS: ${{ inputs.claude_credentials }}
|
||||
|
||||
- name: Run Claude Code
|
||||
id: claude-code
|
||||
@@ -125,6 +124,7 @@ runs:
|
||||
use_bedrock: ${{ inputs.use_bedrock }}
|
||||
use_vertex: ${{ inputs.use_vertex }}
|
||||
anthropic_api_key: ${{ inputs.anthropic_api_key }}
|
||||
claude_code_oauth_token: ${{ steps.prepare.outputs.claude_oauth_token }}
|
||||
env:
|
||||
# Core configuration
|
||||
PROMPT_FILE: /tmp/claude-prompts/claude-prompt.txt
|
||||
@@ -138,7 +138,6 @@ runs:
|
||||
USE_VERTEX: ${{ inputs.use_vertex }}
|
||||
# Only set ANTHROPIC_API_KEY if not using OAuth
|
||||
ANTHROPIC_API_KEY: ${{ inputs.anthropic_api_key != 'use-oauth' && inputs.anthropic_api_key || '' }}
|
||||
CLAUDE_CREDENTIALS: ${{ inputs.claude_credentials }}
|
||||
|
||||
# GitHub token for repository access
|
||||
GITHUB_TOKEN: ${{ steps.prepare.outputs.GITHUB_TOKEN }}
|
||||
|
||||
Reference in New Issue
Block a user