From 7780c60b7060d50a55c45506c0e9a89b4708a2d6 Mon Sep 17 00:00:00 2001 From: acomarcho Date: Wed, 24 Dec 2025 10:10:34 +0700 Subject: [PATCH 1/4] feat: update azure support for ANTHROPIC_FOUNDRY_API_KEY --- action.yml | 1 + base-action/action.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/action.yml b/action.yml index 431962a3e..2b2f09b1f 100644 --- a/action.yml +++ b/action.yml @@ -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 }} diff --git a/base-action/action.yml b/base-action/action.yml index b0e866ef7..687dbfab6 100644 --- a/base-action/action.yml +++ b/base-action/action.yml @@ -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 }} From 0fbafe48044bbc059dc8fcbf42ee57144a184ee1 Mon Sep 17 00:00:00 2001 From: acomarcho Date: Wed, 24 Dec 2025 10:10:41 +0700 Subject: [PATCH 2/4] chore(docs): update dead documentation --- docs/cloud-providers.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/cloud-providers.md b/docs/cloud-providers.md index a02846df0..4981bf848 100644 --- a/docs/cloud-providers.md +++ b/docs/cloud-providers.md @@ -138,4 +138,4 @@ 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). From 1a4a9144d0d4ef22fbc89c4b01ea258cab39fcf6 Mon Sep 17 00:00:00 2001 From: acomarcho Date: Wed, 24 Dec 2025 10:49:18 +0700 Subject: [PATCH 3/4] chore(docs): update cloud-providers.md to show that bedrock/vertex/foundry does not exclusively use OIDC authentication, but can use other methods --- docs/cloud-providers.md | 34 ++++++++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/docs/cloud-providers.md b/docs/cloud-providers.md index 4981bf848..95a82931b 100644 --- a/docs/cloud-providers.md +++ b/docs/cloud-providers.md @@ -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 @@ -139,3 +141,27 @@ permissions: ## Microsoft Foundry Setup 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 supports API key authentication, which is simpler than OIDC and doesn't require Azure login or GitHub App token setup: + +```yaml +- uses: anthropics/claude-code-action@v1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + 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 + +**Note:** This approach uses the built-in `GITHUB_TOKEN` which is automatically available in GitHub Actions - no additional GitHub App setup required. From 6ec14931f6a7bc8d80ce9e5827925e20701f311a Mon Sep 17 00:00:00 2001 From: acomarcho Date: Wed, 24 Dec 2025 10:54:50 +0700 Subject: [PATCH 4/4] chore(docs): simplify notes on github app --- docs/cloud-providers.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/docs/cloud-providers.md b/docs/cloud-providers.md index 95a82931b..ab0722c0e 100644 --- a/docs/cloud-providers.md +++ b/docs/cloud-providers.md @@ -144,12 +144,12 @@ For detailed setup instructions for Microsoft Foundry, see the [official documen ### Using API Key Authentication (Simpler Setup) -Microsoft Foundry supports API key authentication, which is simpler than OIDC and doesn't require Azure login or GitHub App token 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 }} + 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 @@ -163,5 +163,3 @@ Microsoft Foundry supports API key authentication, which is simpler than OIDC an - `ANTHROPIC_FOUNDRY_RESOURCE`: Your Azure Foundry resource name (e.g., `my-foundry-resource`) - `ANTHROPIC_FOUNDRY_API_KEY`: Your Azure Foundry API key - -**Note:** This approach uses the built-in `GITHUB_TOKEN` which is automatically available in GitHub Actions - no additional GitHub App setup required.