You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
GitHub Action
Checkout Repo
v1.3.1
It's based on Base Checkout Action and Cached LFS Checkout Action.
We added a special reference handling called "alt_ref". This feature we need in case of a multi-repo build chain in case of mirror branches. If the feature branch does not exist in your repository, the alternative reference 'alt_ref' will be taken. To handle the reference stuff we are using PyGithub.
You can set regular expression to checkout reference, too.
Check this out on Github Marketplace.
Hint(s):
- Actual you use only for once the action due to this bug.
- Windows did not use an own virtual environment (python)
- This works only for GitHub Repos
- local files will be checked out to folder
.temp
This action supports:
- checkout to a special folder / path
- submodules
- git lfs (in cached mode)
- select a special reference
- select a alternative reference (used when your regular reference does not exist)
- select a reference with regular expression e.g like */release/*.*.* (and get the last matching)
- name: Checkout repo with a special branch
uses: rohmanngmbh/action-checkout-repo@v1.3.1
with:
ref: my-branch
- name: Checkout private repo
uses: rohmanngmbh/action-checkout-repo@v1.3.1
with:
repository: my-org/my-private-repo
token: ${{ secrets.GH_PAT }} # `GH_PAT` is a secret that contains your PAT
path: my-repo
- ${{ github.token }} is scoped to the current repository, so if you want to checkout a different repository that is private you will need to provide your own PAT (personal access token). See here more details.
- name: Checkout git lfs repo
uses: rohmanngmbh/action-checkout-repo@v1.3.1
with:
lfs: true
This uses a regular checkout like Cached LFS Checkout Action.
If you want to use LFS use:
- name: Checkout repo with submodules
uses: rohmanngmbh/action-checkout-repo@v1.3.1
with:
submodules: recursive
- name: Checkout repo with alternative ref
uses: rohmanngmbh/action-checkout-repo@v1.3.1
with:
ref: feature/blue-light
alt_ref: develop
- name: Checkout repo with alternative ref
uses: rohmanngmbh/action-checkout-repo@v1.3.1
with:
ref: */release/*.*.*
The scripts and documentation in this project are released under the MIT License.
- ubuntu-20.04 (ubuntu-latest)
- ubuntu-18.04
- windows-2022 (windows-latest)
- windows-2019
- macos-12
- macos-11 (macos-latest)
- macos-10.15