Fast and simple GitHub action to checkout large Git repos using --reference
It also saves space significantly.
Note: requires git version >= 2.35
- uses: tempest-tech-ltd/checkout@v2
with:
# GitHub repository name (with owner) or direct Git repository URL
# Examples: tempest-tech-ltd/checkout, https://git.example.com/repo.git
# Default:
repository: ${{ github.repository }}
# A token to fetch the repository. Typically, you would use GITHUB_TOKEN explicitly
# Default:
token: null
# Common (reference) git repository path under GITHUB_WORKSPACE
# Default:
common-path: ${repository}.git
# Relative path under GITHUB_WORKSPACE to place the repository
# Default:
path: null
# A branch, tag or SHA to checkout
# Default (if path is not null):
ref: ${{ github.ref_name }}
# Whether to clean working directory or not
# Default:
clean: true- uses: tempest-tech-ltd/checkout@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
path: ${{ github.ref_name }}/src- uses: tempest-tech-ltd/checkout@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
path: abranch-src
ref: abranch
clean: false- uses: tempest-tech-ltd/checkout@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}- uses: tempest-tech-ltd/checkout@v2
with:
repository: chromium/chromium- uses: tempest-tech-ltd/checkout@v2
with:
repository: https://git.example.com/my-repo.git
path: my-repo-srcShould just work as expected.