Checkout: Repository cloning action for workflows
Clones repositories to workflows with configurable authentication and fetch depth.
Learn more about Checkout
Checkout is a GitHub Actions action that retrieves repository code and makes it available to workflow jobs. It clones the target repository under the $GITHUB_WORKSPACE directory and configures authentication credentials for authenticated git operations. The action supports multiple authentication methods including personal access tokens and SSH keys, with configurable fetch depth to control history retrieval. It falls back to REST API downloads when Git 2.18 or higher is unavailable, and manages credential lifecycle through post-job cleanup.
Configurable Fetch Depth
Supports shallow clones (single commit default) or full history retrieval via fetch-depth parameter. Workflows optimize CI speed by fetching minimal history or access complete git operations when needed.
Persistent Authentication Methods
Accepts personal access tokens, SSH keys, or GitHub's default token with automatic credential persistence in git config. Enables authenticated git commands throughout the workflow without repeated credential setup.
Automatic REST Fallback
Falls back to REST API downloads when Git 2.18+ is unavailable in PATH. Ensures repository access across diverse runner environments without requiring specific Git versions.
# .github/workflows/ci.yml
name: CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- run: npm testMinor improvements to git user-agent orchestration tracking and tag handling with annotation preservation.
- –Add orchestrationid to git user-agent when ACTIONSORCHESTRATION_ID is set
- –Fix tag handling: preserve annotations and explicit fetch-tags
Documentation updates and worktree support improvements for the v6 release.
- –Update all references from v5 and v4 to v6
- –Add worktree support for persist-credentials includeIf
- –Clarify v6 README
Major release with Node.js 24 support and enhanced credential persistence to separate files.
- –Update README to include Node.js 24 support details and requirements
- –Persist creds to a separate file
Related Repositories
Discover similar tools and frameworks used by developers
Podman
Daemonless OCI container management with Docker-compatible CLI and rootless execution support.
Self-Hosting Guide
Guide for self-hosted software, infrastructure, networking, and automation tools.
Upload Artifact
Store workflow files as versioned zip artifacts.
ProxmoxVE
Bash scripts for automated Proxmox LXC/VM provisioning.
Kubespray
Production-grade Kubernetes deployment via Ansible playbooks.
Related Reading
Guides and comparisons from the Greptile content library
What is a monorepo? What engineering leaders should know
A monorepo keeps every project, library, and service in one repository. Learn how monorepos compare to multi-repos and monoliths, the real pros and cons, best practices, the build tools worth knowing, and why context matters for AI and code review in a monorepo.
What is agentic coding? Benefits, risks, and best tools to consider
What engineering leaders need to know about agentic coding: how it differs from AI coding and vibe coding, how it works, the benefits and risks, and the tools worth evaluating.
Best AI Coding Tools for Solo Developers (2026 Review)
The best AI coding tools for solo developers in 2026, compared by where they fit in the software development lifecycle: writing code, prototyping, reviewing, testing, and background automation. Plus which tools fit which languages.
Top Greptile alternatives to consider in 2026
A tongue-in-cheek list of Greptile alternatives, from printing out your code to hiring a lizard, with pros, cons, and a comparison table for each.