GuidesHosting choices

Claude Code GitHub Actions: setup, workflows and auth

anthropics/claude-code-action@v1: /install-github-app, @claude and prompt workflows, claude_args, API key or setup-token, Bedrock via OIDC, permissions, costs.

November 23, 2026The Everpod team
The short answer

Claude Code runs in GitHub Actions through Anthropic’s action, anthropics/claude-code-action@v1 (newest release v1.0.287, November 23, 2026). The quickest setup is to run claude in the repository and type /install-github-app: it installs the Claude GitHub App, saves your credential as a repository secret and opens a pull request with the workflow files. Without a prompt input, the action answers @claude in issue and pull request comments; with one, it runs on whatever event the workflow names, a cron schedule included. Extra Claude Code flags go in claude_args. It signs in with an ANTHROPIC_API_KEY secret (API billing), a CLAUDE_CODE_OAUTH_TOKEN from claude setup-token (your Pro, Max, Ultra, Team or Enterprise plan), or through OIDC with no stored key, to Anthropic or to Bedrock, Google Cloud or Foundry. By default only users with write access can trigger it.

Quick setup with /install-github-app

You need admin access to the repository, a github.com remote (the command exits on GitLab and Bitbucket), and the GitHub CLI signed in with gh auth login. Per Anthropic’s GitHub Actions page:

  1. Run claude in the repository and enter /install-github-app. If it reports missing GitHub CLI permissions, run the command it prints and start again.
  2. Install the Claude GitHub App on the repository in the browser that opens, then press Enter in Claude Code.
  3. Select Set up GitHub Actions workflows and keep the @claude mentions workflow, the pull request review workflow, or both. If the repository already has a claude.yml, choose Skip workflow update (configure secrets only) to keep yours.
  4. Choose the credential: a long-lived token made with your Claude subscription, or an API key you paste. It is saved as the secret CLAUDE_CODE_OAUTH_TOKEN or ANTHROPIC_API_KEY.
  5. Confirm with Yes, make these changes. Claude Code pushes a branch and opens GitHub on a pull request ready to create. Create it and merge it; the workflows run from then on.

Esc stops setup part way, and the closing message lists what was already done, such as a pushed branch or a saved secret. The review workflow it writes, and how it differs from Anthropic’s managed reviews, is covered in Claude Code review.

The @claude workflow, set up by hand

Install the app, add the secret as a repository Actions secret, and put this in .github/workflows/claude.yml. It is Anthropic’s example as published:

name: Claude Code
on:
  issue_comment:
    types: [created]
  pull_request_review_comment:
    types: [created]
jobs:
  claude:
    if: contains(github.event.comment.body, '@claude')
    runs-on: ubuntu-latest
    permissions:
      contents: write
      pull-requests: write
      issues: write
      id-token: write
      actions: read
    steps:
      - uses: actions/checkout@v6
        with:
          fetch-depth: 1
      - uses: anthropics/claude-code-action@v1
        with:
          anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
Copied

Then comment something like @claude fix the TypeError in the user dashboard component. Claude answers in one comment that it updates as it works. On an open pull request it pushes commits to the pull request’s branch (for a fork’s pull request, to a pr-N branch in your repository); from an issue, or a closed pull request, it pushes a new branch (prefixed claude/) and leaves a link that opens a pre-filled pull request. Per the action’s FAQ, it does not open the pull request itself, and it does not rebase, merge or force-push. The phrase must be @claude as a whole word; trigger_phrase changes it, and label_trigger or assignee_trigger start it from a label or an assignee instead.

Runs without a mention: prompt and claude_args

Give the action a prompt and it runs on the workflow’s own events instead of waiting for @claude, with its output in the run log unless the prompt tells it to post and it has a tool that can. The prompt can be plain text, /skill-name for a skill in the repository’s .claude/skills/ (check the repository out first), or a plugin’s skill installed with the plugin_marketplaces and plugins inputs. Anthropic’s scheduled example, with a job timeout and a turn limit added:

name: Daily Report
on:
  schedule:
    - cron: "0 9 * * *"
jobs:
  report:
    runs-on: ubuntu-latest
    timeout-minutes: 15
    permissions:
      contents: read
      issues: read
      id-token: write
    steps:
      - uses: anthropics/claude-code-action@v1
        with:
          anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
          prompt: "Generate a summary of yesterday's commits and open issues"
          claude_args: |
            --model claude-opus-5-5
            --max-turns 10
            --allowedTools "mcp__github__list_commits,mcp__github__list_issues"
Copied

claude_args takes any Claude Code CLI flag: --model (without it, Claude Code’s default model), --max-turns, --allowedTools, --mcp-config, --append-system-prompt, --json-schema (the result then comes back in the structured_output output) and --permission-mode. GitHub runs scheduled workflows only from the default branch, and in a public repository turns the schedule off after 60 days without activity.

What Claude may run in these jobs is described two ways. Anthropic’s page says that for a plain-text prompt “Claude has no shell or GitHub API access until you grant the tools the prompt needs”. The action’s own usage guide at v1.0.287 says “The action runs Claude in auto mode by default”: reads and edits in the checkout go ahead, and a safety review decides other tool calls your allow rules do not cover, while broad allow rules are ignored. Its security notes add that the review “catches many unsafe actions, but a call can still run if the review passes it.” If your workflow relies on --allowedTools as a strict list, the guide’s answer is to set the mode yourself: --permission-mode default for prompt workflows, --permission-mode acceptEdits for @claude ones. How those modes behave elsewhere is in running Claude Code without permission prompts.

The inputs you are most likely to set

InputDefaultWhat it does
prompt
emptyInstructions or a skill; empty means wait for the trigger phrase
claude_args
emptyClaude Code CLI flags
anthropic_api_key, claude_code_oauth_token
noneThe credential, from a secret
github_token
noneYour own GitHub token; without it the action acts as the Claude GitHub App
trigger_phrase
@claudeThe phrase it answers to
label_trigger, assignee_trigger
claude, noneStart from a label (with the labeled issue event) or an assignee
allowed_bots, allowed_non_write_users
emptyLet named bots or users without write access trigger it
allow_fork_prs
true"false" skips pull requests from forks
restrict_untrusted_prs
trueBlocks commands that run repository code on pull requests from authors without write access
settings
emptyClaude Code settings as JSON or a file path
use_bedrock, use_vertex, use_foundry
falseSend model calls to your cloud account
show_full_output
falseFull JSON output in the log, which can include secrets

The full list is the action’s action.yml. The action installs Claude Code on the runner itself; to use a build you installed, pass its path in path_to_claude_code_executable.

Signing in: API key, subscription token or no stored key

An API key from the Claude Console, in ANTHROPIC_API_KEY, bills each run as API usage. For a secret shared across an organization’s repositories, Anthropic recommends this over a subscription token. How to make a key and keep its spend in check is in the Claude Code API key guide.

A subscription token comes from running claude setup-token on your own machine. Per Anthropic’s authentication page it is a one-year token that needs a Pro, Max, Ultra, Team or Enterprise plan, can only make model requests, and is printed once and saved nowhere, so paste it straight into the CLAUDE_CODE_OAUTH_TOKEN secret. Runs then draw on that person’s plan and its usage limits, not API billing, which is why it suits one person’s repositories better than a team’s. If both an API key and the token reach Claude Code, the key wins. More on the token, and renewing it, in claude setup-token.

No stored key, through Anthropic. Workload identity federation swaps the job’s GitHub OIDC token for API access through a Claude Console service account. After creating the federation rule in the Console (the action’s setup guide has the steps), replace the key line with the rule’s IDs and keep id-token: write:

      - uses: anthropics/claude-code-action@v1
        with:
          anthropic_federation_rule_id: ${{ secrets.ANTHROPIC_FEDERATION_RULE_ID }}   # fdrl_...
          anthropic_organization_id: ${{ secrets.ANTHROPIC_ORGANIZATION_ID }}
          # optional: anthropic_service_account_id (svac_...), anthropic_workspace_id (wrkspc_...)
Copied

No stored key, through your cloud. With use_bedrock, use_vertex or use_foundry, model calls go to Amazon Bedrock, Google Cloud’s Agent Platform or Microsoft Foundry, and the job signs in to that cloud with its OIDC token. On AWS, per Anthropic’s cloud providers page, that means an OIDC identity provider for https://token.actions.githubusercontent.com with audience sts.amazonaws.com, and an IAM role that trusts it only for your repository (a subject such as repo:your-org/your-repo:*) and may invoke Claude models. Its ARN goes in an AWS_ROLE_TO_ASSUME secret. The page’s Bedrock workflow, in the form it gives for the official Claude GitHub App, trimmed to the comment events:

name: Claude PR Action
on:
  issue_comment:
    types: [created]
  pull_request_review_comment:
    types: [created]

permissions:
  contents: write
  pull-requests: write
  issues: write
  id-token: write

jobs:
  claude-pr:
    if: contains(github.event.comment.body, '@claude')
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
      - uses: aws-actions/configure-aws-credentials@v4
        with:
          role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
          aws-region: us-west-2
      - uses: anthropics/claude-code-action@v1
        with:
          use_bedrock: "true"
          claude_args: '--model us.anthropic.claude-sonnet-4-6'
Copied

The Google Cloud and Foundry versions swap the AWS step for google-github-actions/auth@v2 or azure/login@v2. The page warns that on a public repository any user’s comment containing the trigger phrase starts this workflow, and the cloud sign-in runs before the action checks the commenter’s write access, so outsiders cannot use it but can leave entries in your cloud’s audit log and spend Actions minutes. A step that checks the commenter’s access before the credential steps avoids that.

The GitHub permissions involved

Two sets apply. The permissions: block in the workflow is what the job’s own token may do; keep it to what the job needs, as the examples above do (the scheduled report only reads). The Claude GitHub App, which the action acts as by default, has its own set. Anthropic says the action relies on three of its permissions, Contents, Issues and Pull requests, each read and write. The app is shared with Code Review and other Claude features, though, and installing it grants all of these, since “GitHub doesn’t let you accept a subset”:

On workflow files the two Anthropic sources disagree: that table lists Workflows as read and write, while the action’s FAQ says “The GitHub App for Claude doesn’t have workflow write access for security reasons” and that Claude will not edit them. The action’s security notes reconcile part of it: they list Workflows (read and write) among the permissions the app requests for future features, not ones the action uses yet. If your organization wants only the three, Anthropic’s route is a custom GitHub App with Contents, Issues and Pull requests, its ID and private key kept as APP_ID and APP_PRIVATE_KEY secrets, and a token made from them with actions/create-github-app-token@v2 passed as github_token. A custom app covers the action only; Code Review still needs the official one. Passing the job’s own GITHUB_TOKEN instead works too, with a catch covered under the failures below. Install either app on selected repositories rather than all of them.

Who can make it run, and what it reads

Before Claude starts, the action checks the actor. On issue and pull request events the user must have write access to the repository, and a bot is refused unless it is in allowed_bots, which stops loops. A scheduled run skips the write check but not the bot check: GitHub attributes it to a repository user, usually whoever last changed the cron line, so if that was a bot, list it. allowed_non_write_users lets named users through, and the security notes call it a significant risk; it also needs your own github_token.

What a run costs

Two meters run at once. The first is GitHub Actions. Per GitHub’s billing page (read November 23, 2026), standard GitHub-hosted runners are free in public repositories and self-hosted runners are free everywhere; in private repositories each plan includes a monthly amount of compute in dollars ($12 on Free, $18 on Pro and Team, $300 on Enterprise Cloud), and a standard 2-core Linux runner costs $0.006 a minute. By that arithmetic, Free’s allowance is 2,000 Linux minutes, and a ten-minute Claude job in a private repository uses six cents of it.

The second is the model. With an API key, every run is billed by the tokens it uses, which grow with the prompt, the task and how much of the repository Claude reads; the action’s usage guide adds that auto mode’s safety-review requests may count toward token usage. With a subscription token, runs come out of the plan’s usage limits instead. Current rates are in what Claude Code costs. The brakes Anthropic lists: specific @claude requests, issue templates that give context up front, a short CLAUDE.md (read on every run), --max-turns, a timeout-minutes on the job, and GitHub’s concurrency groups to stop parallel runs piling up.

When it does not work

Still on @beta? Change the uses: line to @v1, delete the mode input (v1 chooses the mode from whether there is a prompt), rename direct_prompt to prompt, and move max_turns and model into claude_args; custom_instructions becomes --append-system-prompt. OpenAI’s equivalent for Codex, which takes only an API key, is in Codex and GitHub.

Run Claude Code on an always-on developer pod.

A developer pod is a permanent cloud computer (VPS), set up and secured for you, with your pick of Claude Code, Codex, OpenCode, Pi, Hermes and OpenClaw installed. Run more agents at once than your laptop can hold, and keep them working when it’s closed. From $24 a month, built in about ten minutes.