actions-marketplace-validations/Checkout Repo
Action to checkout GIT Repository with special reference handling.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Maintainedlast commit Sep 28, 2025
- License
- MIT
Pinned Snippet
uses: actions-marketplace-validations/rohmanngmbh_action-checkout-repo@97847692a66b353673fad76c19bf3d00f16bfbda # no releases — HEAD as of 2026-07-10tags can be moved; commit SHAs can't. why a SHA?
Inputs
| name | description | required | default |
|---|---|---|---|
| repository | Repository name with owner. For example, actions/checkout | no | ${{ github.repository }} |
| ref | The 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_ref | The 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 | — |
| order | Direction 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 | no | top |
| token | Personal 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 }} |
| path | Relative path under $GITHUB_WORKSPACE to place the repository | no | "" |
| lfs | Whether to download Git-LFS files | no | false |
| regex_next_to_last | In 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). | no | false |
| submodules | Whether to checkout submodules: `true` to checkout submodules or `recursive` to recursively checkout submodules. | no | false |
| include | Explicitly include files for LFS | no | * |
| exclude | Explicitly exclude files for LFS | no | "" |
| enableCrossOsArchive | Whether 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). | no | false |
Outputs
no outputs