Skip to content
Latchkey

actions/checkout: Usage, Inputs & Common Fixes

actions/checkout clones your repo into the runner. A few inputs solve most of its gotchas.

Almost every workflow starts with checkout. Know these inputs and you avoid the common failures.

Common inputs

InputWhat it does
fetch-depth: 0Full history (needed for tags, blame, some tools)
submodules: recursiveCheck out submodules
tokenPAT/app token for private submodules or pushes
refCheck out a specific branch/tag/SHA

Typical fixes

  • Shallow-clone errors → set fetch-depth: 0.
  • Private submodule auth → pass a token with access.
  • Detached HEAD confusion → check out an explicit ref.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →