Spec file
Claude Code GitHub Actions: triggers and authentication
Check triggers, checkout, authentication and result location when integrating CI. An action reference is not an executed workflow; not tested.
Mentioning an agent in a comment and running a task directly in a pipeline are different trigger choices. This page focuses on the official GitHub Actions integration and the checks between a workflow file and an actual run. It does not install an app, create a secret or send a comment.
- Verified
- · Not tested by us
- Applies to
- Claude Code Based on Claude Code documentation read on 2026-11-03; behavior depends on the installed version and organization settings.[1]
- Tools
File locations
| Path | Scope | How it is read |
|---|---|---|
.github/workflows/claude.yml | A workflow file in a GitHub repository; the filename can be chosen | GitHub Actions starts jobs from workflow events and conditions; the Claude Code action performs the requested task.[1] |
When to use
- You want Claude Code in a GitHub issue or PR workflow and have repository administrator access.[1]
When not to use
- The repository is hosted elsewhere, or authentication and repository permissions are not established.[1]
Choose when the job runs
The official interactive example uses created events for issue_comment and pull_request_review_comment, with a job condition that the comment contains @claude. The action also checks the trigger phrase. An action reference alone does not mean every PR is reviewed automatically. Inspect events, the if condition and the prompt first.[1]
Separate GitHub identity from model authentication
Manual setup consists of installing the Claude GitHub App, adding an authentication secret and placing a workflow file in the repository. The documentation supports ANTHROPIC_API_KEY or a subscription OAuth token generated with claude setup-token and stored as CLAUDE_CODE_OAUTH_TOKEN. These secrets map to different action inputs. Choose the path supported by your account and organization.[1]
Review the workflow in dependency order
- Run actions/checkout before the Claude action so the repository and local skill files are available.
- The current official example references anthropics/claude-code-action@v1; review the official example and version again when adopting it.
- The default App authentication requires id-token: write, and actions: read lets Claude inspect CI results. Review other permissions against the task and official workflow.
- Define whether the expected output is an issue or PR comment, a file change or a workflow result, then inspect that location.
How to assess the first run
In a controlled repository, confirm that the intended event started the workflow, then inspect checkout, authentication and action logs. Starting a job is not task success: check that the output addresses the requested task and that any file changes have reviewable evidence. The documented /install-github-app quick setup exits for repositories outside github.com; consult the integration documentation for that platform.[1]
This page only verifies the official source. No app was installed, no secret saved, no workflow changed, no model called and no comment posted. It does not prove that any repository is configured. Record actual CI execution and model costs separately on your first run.[1]
Sources
All links are official pages; verification dates are listed per source, and links point to the version checked.