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:
claude
2025-07-29 21:11:18 +00:00
parent 2fb6134aa3
commit 8d61fbcfc2
2 changed files with 14 additions and 7 deletions

View File

@@ -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 }}