rohmanngmbh/Checkout Repo

Action to checkout GIT Repository with special reference handling.

View on GitHub

Trust Signals

Scorecard Score
Scorecard 2–4scored Jul 6, 2026
Maintenance Recency
Maintainedlast commit Sep 28, 2025
License
MIT

Pinned Snippet

workflow.ymlSHA-pinned
uses: rohmanngmbh/action-checkout-repo@97847692a66b353673fad76c19bf3d00f16bfbda # v1.3.8

tags can be moved; commit SHAs can't. why a SHA?

namedescriptionrequireddefault
repositoryRepository name with owner. For example, actions/checkoutno${{ github.repository }}
refThe branch, tag or SHA to checkout. When checking out the repository that triggered a workflow, this defaults to the reference or SHA for that event. Otherwise, uses the default branch. no${{ github.ref }}
alt_refThe alternative branch, tag or SHA to checkout. When checking out the repository that triggered a workflow, this defaults to the reference or SHA for that event. Otherwise, uses the default branch. no
orderDirection of sort in case of a regular expression for your reference. ('top' or 'down') Example: In case if ref=v* with tags v1, v2, v3 you will get v3 as a valid reference notop
tokenPersonal access token (PAT) used to fetch the repository. The PAT is configured with the local git config, which enables your scripts to run authenticated git commands. The post-job step removes the PAT. We recommend using a service account with the least permissions necessary. Also when generating a new PAT, select the least scopes necessary. [Learn more about creating and using encrypted secrets](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets) no${{ github.token }}
pathRelative path under $GITHUB_WORKSPACE to place the repositoryno""
lfsWhether to download Git-LFS filesnofalse
regex_next_to_lastIn case of a regular expression matches your selected sha with the head of your default branch: here you can select the behavior. Is the value false (default) the found sha will be taken. Is the value true, the last matching regex before the matching sha will be taken. Example: In case if ref=v* with tags v1, v2, v3 you will get v3 as a valid reference. Is the v3 on the same sha with your main (default branch) and this flag is true. We will switch to v2 (next to last). nofalse
submodulesWhether to checkout submodules: `true` to checkout submodules or `recursive` to recursively checkout submodules. nofalse
includeExplicitly include files for LFS no*
excludeExplicitly exclude files for LFS no""
enableCrossOsArchiveWhether the cache is cross-os compatible. This is useful to cache dependencies which are independent of the runner platform. This will help reduce the consumption of the cache quota and help build for multiple platforms from the same cache. [Learn more about cross-os caching](https://github.com/actions/cache/blob/main/tips-and-workarounds.md#cross-os-cache). nofalse

no outputs