Fix OAuth: Add CLAUDE_CODE_OAUTH_TOKEN env var and fix API key handling
- Add CLAUDE_CODE_OAUTH_TOKEN to environment variables for base action - Don't pass 'use-oauth' as anthropic_api_key to base action - This should allow Claude Code to detect and use OAuth properly
This commit is contained in:
@@ -124,7 +124,7 @@ runs:
|
|||||||
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 != 'use-oauth' && inputs.anthropic_api_key || '' }}
|
||||||
claude_code_oauth_token: ${{ steps.prepare.outputs.claude_oauth_token }}
|
claude_code_oauth_token: ${{ steps.prepare.outputs.claude_oauth_token }}
|
||||||
env:
|
env:
|
||||||
# Core configuration
|
# Core configuration
|
||||||
@@ -139,6 +139,8 @@ runs:
|
|||||||
USE_VERTEX: ${{ inputs.use_vertex }}
|
USE_VERTEX: ${{ inputs.use_vertex }}
|
||||||
# Only set ANTHROPIC_API_KEY if not using OAuth
|
# Only set ANTHROPIC_API_KEY if not using OAuth
|
||||||
ANTHROPIC_API_KEY: ${{ inputs.anthropic_api_key != 'use-oauth' && inputs.anthropic_api_key || '' }}
|
ANTHROPIC_API_KEY: ${{ inputs.anthropic_api_key != 'use-oauth' && inputs.anthropic_api_key || '' }}
|
||||||
|
# OAuth token for Claude Code
|
||||||
|
CLAUDE_CODE_OAUTH_TOKEN: ${{ steps.prepare.outputs.claude_oauth_token }}
|
||||||
|
|
||||||
# GitHub token for repository access
|
# GitHub token for repository access
|
||||||
GITHUB_TOKEN: ${{ steps.prepare.outputs.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ steps.prepare.outputs.GITHUB_TOKEN }}
|
||||||
|
|||||||
Reference in New Issue
Block a user