anthropics/Claude Code Base Action

Run Claude Code in GitHub Actions workflows

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Activelast commit Jul 9, 2026
License
MIT

Pinned Snippet

workflow.ymlSHA-pinned
uses: anthropics/claude-code-base-action@e8132bc5e637a42c27763fc757faa37e1ee43b34 # beta

tags can be moved; commit SHAs can't. why a SHA?

namedescriptionrequireddefault
promptThe prompt to send to Claude Code (mutually exclusive with prompt_file)no""
prompt_filePath to a file containing the prompt to send to Claude Code (mutually exclusive with prompt)no""
settingsClaude Code settings as JSON string or path to settings JSON fileno""
claude_argsAdditional arguments to pass directly to Claude CLI (e.g., '--max-turns 3 --mcp-config /path/to/config.json')no""
anthropic_api_keyAnthropic API key (required for direct Anthropic API)no""
claude_code_oauth_tokenClaude Code OAuth token (alternative to anthropic_api_key)no""
anthropic_federation_rule_idWorkload identity federation rule ID (fdrl_...). When set with anthropic_organization_id, the action authenticates to the Claude API by exchanging the workflow's GitHub OIDC token instead of using a static API key. Requires `id-token: write` permission.no""
anthropic_organization_idAnthropic organization UUID used for workload identity federationno""
anthropic_service_account_idService account ID (svac_...) the federated token acts as (optional, used with workload identity federation)no""
anthropic_workspace_idWorkspace ID (wrkspc_...) for workload identity federation. Optional when the federation rule targets a single workspace.no""
anthropic_oidc_audienceAudience to request on the GitHub OIDC token used for workload identity federation. Defaults to https://api.anthropic.com.no""
use_bedrockUse Amazon Bedrock with OIDC authentication instead of direct Anthropic APInofalse
use_vertexUse Google Vertex AI with OIDC authentication instead of direct Anthropic APInofalse
use_foundryUse Microsoft Foundry with OIDC authentication instead of direct Anthropic APInofalse
use_node_cacheWhether to use Node.js dependency caching (set to true only for Node.js projects with lock files)nofalse
path_to_claude_code_executableOptional path to a custom Claude Code executable. If provided, skips automatic installation and uses this executable instead. WARNING: Using an older version may cause problems if the action begins taking advantage of new Claude Code features. This input is typically not needed unless you're debugging something specific or have unique needs in your environment.no""
path_to_bun_executableOptional path to a custom Bun executable. If provided, skips automatic Bun installation and uses this executable instead. WARNING: Using an incompatible version may cause problems if the action requires specific Bun features. This input is typically not needed unless you're debugging something specific or have unique needs in your environment.no""
show_full_outputShow full JSON output from Claude Code. WARNING: This outputs ALL Claude messages including tool execution results which may contain secrets, API keys, or other sensitive information. These logs are publicly visible in GitHub Actions. Only enable for debugging in non-sensitive environments.nofalse
pluginsNewline-separated list of Claude Code plugin names to install (e.g., 'code-review@claude-code-plugins feature-dev@claude-code-plugins')no""
plugin_marketplacesNewline-separated list of Claude Code plugin marketplace Git URLs to install from (e.g., 'https://github.com/user/marketplace1.git https://github.com/user/marketplace2.git')no""
namedescription
conclusionExecution status of Claude Code ('success' or 'failure')
execution_filePath to the JSON file containing Claude Code execution log
structured_outputJSON string containing all structured output fields when --json-schema is provided in claude_args (use fromJSON() or jq to parse)
session_idThe Claude Code session ID that can be used with --resume to continue this conversation