Navigate:
Checkout
~$CHECK0.5%

Checkout: Repository cloning action for workflows

Clones repositories to workflows with configurable authentication and fetch depth.

LIVE RANKINGS • 10:20 AM • STEADY
OVERALL
#187
103
CLOUD & DEVOPS
#11
4
30 DAY RANKING TREND
ovr#187
·Cloud#11
STARS
7.6K
FORKS
2.4K
7D STARS
+39
7D FORKS
+15
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.

Checkout

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.0.2

Minor 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
vv6.0.1

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
vv6.0.0

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


[ EXPLORE MORE ]

Related Repositories

Discover similar tools and frameworks used by developers