Claude Code GitHub Actions Configuration Guide

1. Obtain API Key

Open the Ace Data Cloud application list, enter the available applications and copy the API Key.

Obtain Ace Data Cloud API Key

In the target GitHub repository, create a new Secret under Settings → Secrets and variables → Actions:

ACEDATACLOUD_API_KEY

2. Install GitHub App

Install the Claude GitHub App and authorize the target repository. This official App will request a fixed set of full permissions; among them, the Claude Code Action actually uses Contents, Issues, and Pull requests permissions, and the GitHub installation page cannot only check these three items. If the organization requires minimal permissions, please create a custom GitHub App according to the official documentation.

3. Add Workflow

Create .github/workflows/claude.yml:

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
      actions: read
      id-token: write
    env:
      ANTHROPIC_BASE_URL: https://api.acedata.cloud
      ANTHROPIC_CUSTOM_HEADERS: "Authorization: Bearer ${{ secrets.ACEDATACLOUD_API_KEY }}"
    steps:
      - uses: actions/checkout@v6
        with:
          fetch-depth: 1
      - uses: anthropics/claude-code-action@v1
        with:
          anthropic_api_key: dummy-not-used

claude-code-action requires a non-empty anthropic_api_key input; the placeholder value here will not be used for platform authentication. ANTHROPIC_CUSTOM_HEADERS will override the Bearer Header required for Ace Data Cloud, and the real Key only comes from GitHub Secret.

4. Verification

After submitting the Workflow, send the following in an Issue or PR comment:

@claude Reply only OK

If successful, the Actions workflow will complete and update the result in the corresponding Issue/PR. If the Action indicates missing credentials, confirm that dummy-not-used still exists; for a 401 error, check the ACEDATACLOUD_API_KEY Secret. Do not print Secrets in the logs. You can use claude_args to set --max-turns as needed or choose the currently available model, but the access template does not fix the model.

Official References