Navigate:
All Reposcheckout
~$CHECKO0.2%

Checkout: Repository cloning action for workflows

Clones repositories to workflows with configurable authentication and fetch depth.

LIVE RANKINGS • 06:50 AM • STEADY
OVERALL
#116
54
CLOUD & DEVOPS
#6
3
30 DAY RANKING TREND
ovr#116
·Cloud#6
STARS
7.4K
FORKS
2.3K
DOWNLOADS
379
7D STARS
+12
7D FORKS
+3
See Repo:
Share:

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.


1

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.

2

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.

3

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 test

vv6-beta

Requires 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.
vv5.0.0

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.
vv4.3.0

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

Loading tweets...


[ EXPLORE MORE ]

Related Repositories

Discover similar tools and frameworks used by developers