This page builds on the GitHub Actions setup. It assumes you already know the workflow file and the
anthropics/claude-code-action step, and covers only what a cloud provider changes.Choose your provider
The Claude Code GitHub Action supports three providers, and the setup steps below differ only in the cloud-side configuration. Use the one where your organization already has Claude model access. You tell the Claude Code GitHub Action which provider to use with one input in theanthropics/claude-code-action step’s with: block:
- Amazon Bedrock:
use_bedrock: "true" - Google Cloud’s Agent Platform:
use_vertex: "true" - Microsoft Foundry:
use_foundry: "true"
Prerequisites
Before you start, you need:- Admin access to the repository where the Claude Code GitHub Action runs, to install a GitHub App and add secrets
- Permission to create identity resources in your cloud account: IAM roles and OIDC identity providers on AWS, Workload Identity Federation resources and service accounts on Google Cloud, or Microsoft Entra applications on Azure
- Claude model access on your provider:
- Amazon Bedrock: access granted to Claude models. Cross-region inference profiles, such as the
us.model IDs in this page’s examples, need access granted in every region of their region group. See Claude Code on Amazon Bedrock - Google Cloud’s Agent Platform: a project with the Agent Platform API enabled and access to Claude models. See Claude Code on Google Cloud’s Agent Platform
- Microsoft Foundry: a Foundry resource with a Claude model deployment. See Claude Code on Microsoft Foundry
- Amazon Bedrock: access granted to Claude models. Cross-region inference profiles, such as the
Set up the integration
Beyond the prerequisites, you create four things: a GitHub identity for the Claude Code GitHub Action, the cloud-side trust configuration, the repository secrets, and the workflow file. The steps below walk through each.1
Choose a GitHub identity
The Claude Code GitHub Action pushes commits and posts comments through a GitHub identity. The quick setup installs the official Claude GitHub App for this. With a cloud provider, you choose the identity yourself:
- Official Claude GitHub App: install it on the repository, or skip to the next step if it’s already installed
- Custom GitHub App: create your own app, described below, when you want only the three permissions the Claude Code GitHub Action uses rather than the official app’s full set
- GitHub’s automatic
GITHUB_TOKEN: no app to create or install, but GitHub doesn’t trigger your CI workflows on commits made with it
- Contents: read and write
- Issues: read and write
- Pull requests: read and write
.pem file, note the App ID from the app’s settings page, and install the app on the repository where the Claude Code GitHub Action runs. You add the key and the ID as secrets in the third step.2
Configure cloud authentication
Configure your cloud to trust the OIDC token that GitHub issues to the workflow, so each workflow run gets short-lived cloud credentials. The bullets in each tab summarize what to create, and each tab links the cloud vendor’s own guide for the console-level steps.
- Amazon Bedrock
- Google Cloud's Agent Platform
- Microsoft Foundry
Create the trust configuration in your AWS account, following the AWS guide to creating OIDC identity providers:
- Add a GitHub OIDC identity provider with provider URL
https://token.actions.githubusercontent.comand audiencests.amazonaws.com - Create an IAM role trusted by that provider as a web identity, and attach the scoped invocation policy from IAM configuration, which grants
bedrock:InvokeModel,bedrock:InvokeModelWithResponseStream,bedrock:ListInferenceProfiles, andbedrock:GetInferenceProfile, along with twoaws-marketplacesubscription actions - Limit the role’s trust policy to your repository with a subject condition such as
repo:your-org/your-repo:*. See GitHub’s OIDC hardening guide for the claim format
3
Add repository secrets
In the repository where the Claude Code GitHub Action runs, add the secrets for your provider, plus the two app secrets if you created a custom GitHub App in the first step. See GitHub’s guide to using secrets in GitHub Actions.
4
Create the workflow file
Create a workflow file for your provider, such as With any provider, you can bound run length and cost by adding
.github/workflows/claude.yml. Each example responds to @claude mentions, authenticates to GitHub with a custom app, and includes the id-token: write permission, which GitHub requires to issue the OIDC token that your cloud provider exchanges for credentials.If you chose a different GitHub identity in the first step, adjust the example:- Official Claude GitHub App: delete the Generate GitHub App token step and the
github_tokenline - GitHub’s automatic token: delete the token-generation step and change the
github_tokenline togithub_token: ${{ secrets.GITHUB_TOKEN }}
- Amazon Bedrock
- Google Cloud's Agent Platform
- Microsoft Foundry
Replace the
aws-region value with your own. The credentials step exports it as AWS_REGION for the rest of the job.--max-turns to claude_args. See Manage costs.5
Test the setup
Mention
@claude in an issue or PR comment, then watch the run in the repository’s Actions tab. Claude replies in a comment on the same issue or PR.Troubleshooting
A failing run usually breaks in one of two places:- Authentication errors: usually an OIDC misconfiguration. Check that the workflow includes the
id-token: writepermission, that the trust configuration’s repository condition matches your repository exactly, and that the secret names in your workflow match the ones you added - Trigger and CI problems: these behave the same as when the Claude Code GitHub Action calls the Claude API. See the main page’s troubleshooting section and the Claude Code GitHub Action’s FAQ
What’s next
- Claude Code GitHub Actions for examples, parameters, and best practices
- Claude Code on Amazon Bedrock for Bedrock model IDs and regions
- Claude Code on Google Cloud’s Agent Platform for Agent Platform model IDs and regions
- Claude Code on Microsoft Foundry for Foundry model and endpoint configuration