Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ runs:
# Microsoft Foundry configuration
ANTHROPIC_FOUNDRY_RESOURCE: ${{ env.ANTHROPIC_FOUNDRY_RESOURCE }}
ANTHROPIC_FOUNDRY_BASE_URL: ${{ env.ANTHROPIC_FOUNDRY_BASE_URL }}
ANTHROPIC_FOUNDRY_API_KEY: ${{ env.ANTHROPIC_FOUNDRY_API_KEY }}
ANTHROPIC_DEFAULT_SONNET_MODEL: ${{ env.ANTHROPIC_DEFAULT_SONNET_MODEL }}
ANTHROPIC_DEFAULT_HAIKU_MODEL: ${{ env.ANTHROPIC_DEFAULT_HAIKU_MODEL }}
ANTHROPIC_DEFAULT_OPUS_MODEL: ${{ env.ANTHROPIC_DEFAULT_OPUS_MODEL }}
Expand Down
1 change: 1 addition & 0 deletions base-action/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ runs:
# Microsoft Foundry configuration
ANTHROPIC_FOUNDRY_RESOURCE: ${{ env.ANTHROPIC_FOUNDRY_RESOURCE }}
ANTHROPIC_FOUNDRY_BASE_URL: ${{ env.ANTHROPIC_FOUNDRY_BASE_URL }}
ANTHROPIC_FOUNDRY_API_KEY: ${{ env.ANTHROPIC_FOUNDRY_API_KEY }}
ANTHROPIC_DEFAULT_SONNET_MODEL: ${{ env.ANTHROPIC_DEFAULT_SONNET_MODEL }}
ANTHROPIC_DEFAULT_HAIKU_MODEL: ${{ env.ANTHROPIC_DEFAULT_HAIKU_MODEL }}
ANTHROPIC_DEFAULT_OPUS_MODEL: ${{ env.ANTHROPIC_DEFAULT_OPUS_MODEL }}
34 changes: 29 additions & 5 deletions docs/cloud-providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,17 @@
You can authenticate with Claude using any of these four methods:

1. Direct Anthropic API (default)
2. Amazon Bedrock with OIDC authentication
3. Google Vertex AI with OIDC authentication
4. Microsoft Foundry with OIDC authentication
2. Amazon Bedrock
3. Google Vertex AI
4. Microsoft Foundry

For detailed setup instructions for AWS Bedrock and Google Vertex AI, see the [official documentation](https://code.claude.com/docs/en/github-actions#for-aws-bedrock:).

**Note**:

- Bedrock, Vertex, and Microsoft Foundry use OIDC authentication exclusively
- **AWS Bedrock** supports IAM access keys (`AWS_ACCESS_KEY_ID` + `AWS_SECRET_ACCESS_KEY`), temporary credentials via OIDC, or bearer token (`AWS_BEARER_TOKEN_BEDROCK`)
- **Google Vertex AI** supports service account key files (`GOOGLE_APPLICATION_CREDENTIALS`) or OIDC via Workload Identity Federation
- **Microsoft Foundry** supports API key (`ANTHROPIC_FOUNDRY_API_KEY`) or OIDC via Azure login
- AWS Bedrock automatically uses cross-region inference profiles for certain models
- For cross-region inference profile models, you need to request and be granted access to the Claude models in all regions that the inference profile uses

Expand Down Expand Up @@ -138,4 +140,26 @@ permissions:

## Microsoft Foundry Setup

For detailed setup instructions for Microsoft Foundry, see the [official documentation](https://docs.anthropic.com/en/docs/claude-code/microsoft-foundry).
For detailed setup instructions for Microsoft Foundry, see the [official documentation](https://code.claude.com/docs/en/microsoft-foundry).

### Using API Key Authentication (Simpler Setup)

Microsoft Foundry also supports API key authentication, which is simpler than OIDC and doesn't require Azure login.

```yaml
- uses: anthropics/claude-code-action@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }} # Or set up your own GitHub App if you're using your own app like in previous examples
use_foundry: "true"
claude_args: |
--model claude-sonnet-4-5
# ... other inputs
env:
ANTHROPIC_FOUNDRY_RESOURCE: ${{ secrets.ANTHROPIC_FOUNDRY_RESOURCE }}
ANTHROPIC_FOUNDRY_API_KEY: ${{ secrets.ANTHROPIC_FOUNDRY_API_KEY }}
```

**Required secrets:**

- `ANTHROPIC_FOUNDRY_RESOURCE`: Your Azure Foundry resource name (e.g., `my-foundry-resource`)
- `ANTHROPIC_FOUNDRY_API_KEY`: Your Azure Foundry API key