# Tutorial: Wire Claude Code into GitHub Actions, GitLab and Jenkins | Alher Tech

> Three ready-to-use CI recipes that put Claude Code inside GitHub Actions, GitLab CI and Jenkins so the agent triages tests, regenerates snapshots and opens cleanup PRs.

- Canonical page: https://alhertech.com/en/claude-code/ci-cd-integration/
- Site: Alher Tech (custom software, AI agents and SEO engineering, https://alhertech.com/)
- Contact: https://alhertech.com/en/contact/

---

Once the agent is trustworthy enough on your repo, put it in CI. Triage failing tests, regenerate snapshots, open cleanup PRs, all without human involvement. Here are three ready-to-use pipeline recipes.

Updated: April 24, 2026

## GitHub Actions

Use `anthropics/claude-code-action` with an `ANTHROPIC_API_KEY` secret. The action runs in headless mode against the PR diff. Output becomes an inline review comment.

## GitLab CI

Stage with `image: node:20`, install `@anthropic-ai/claude-code`, run in headless mode with `--print` flag. Pipe output to `glab mr note`. Works for self-hosted runners too.

## Jenkins

Declarative pipeline with a `nodejs` tool, shell stage that calls `claude --print`, and `archiveArtifacts` for the transcript. Pair with a Jenkins shared library to reuse across dozens of pipelines.

## Frequently asked questions

### Does running headless skip hooks?

No. Hooks run the same way. That is why CI is a safe place for the agent: the same guardrails that hold locally hold in CI.
