Action — setup-claude-code
Installs the Claude Code CLI (claude) on a Linux runner, pinned to one version and checked against the SHA-256 recorded in this repository for each architecture. Used by pr-description.yml.
Usage
yaml
steps:
- uses: KevinDeBenedetti/github-workflows/.github/actions/setup-claude-code@main
- run: claude --versionInputs
None.
Steps
- Pick the release binary for the runner:
linux-x64orlinux-arm64(glibc only) - Download it from
downloads.claude.aiand check it against the pinned SHA-256 - Add its directory to
PATH
Notes
- No version input: a version chosen by the caller could not be checked against a pinned checksum. The version follows the release of this repository you pin.
- The pinned SHA-256 values are the ones listed in the release's signed
manifest.json. Renovate bumps the version (npm datasource,@anthropic-ai/claude-code); the job then fails closed untilscripts/update-tool-checksums.pyrefreshes the checksums. - The action sets no credential. The CLI authenticates with
CLAUDE_CODE_OAUTH_TOKEN(subscription) orANTHROPIC_API_KEYin the step that runs it.