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 testRequires Actions Runner ≥v2.329.0; credentials now stored in $RUNNER_TEMP instead of local git config.
- –Upgrade your Actions Runner to v2.329.0 or later before adopting this release.
- –Docker container actions now access persisted credentials from $RUNNER_TEMP, not git config.
Requires runner v2.327.1+ and migrates to Node.js 24; workflows using older runners will fail.
- –Upgrade self-hosted runners to v2.327.1 or newer before deploying this action version.
- –Verify Node.js 24 compatibility in any custom scripts or tooling that interact with checkout internals.
Maintenance release with documentation updates and dependency refreshes; no breaking changes or new requirements specified.
- –Review updated README for recommended permissions when checking out multiple repositories in workflows.
- –Update package dependencies to latest versions; release notes do not detail specific security or functional fixes.
See how people are using checkout
Top in Cloud & DevOps
Related Repositories
Discover similar tools and frameworks used by developers
dockge
Self-hosted Docker Compose manager with real-time terminal streaming.
portainer
Web-based management platform for multi-orchestrator container environments.
node_exporter
Collects Unix system metrics for Prometheus monitoring.
aws-cdk
Programming language abstractions that synthesize into CloudFormation templates.
kubespray
Production-grade Kubernetes deployment via Ansible playbooks.