nscloud-checkout-action
Namespace platform provides Cache Volumes feature that allows workflows to share data across invocations.
These caches can store Git repository mirrors for fast checkouts. This action performs uses the Namespace cache volumes to store and retrieve the git mirrors.
Prerequisites
The git mirrors cache volumes must be enabled in runners labe. See Caching Git Repositories
Example
jobs:
build:
name: Build large Git repository
runs-on:
- nscloud-ubuntu-22.04-amd64-2x4-with-cache
- nscloud-git-mirror-5gb
steps:
- name: Checkout with Namespace Git mirrors cache
uses: namespacelabs/nscloud-checkout-action@v1
with:
fetch-depth: 10
Options
repository
string
. Repository name with owner. For example, namespacelabs/foundation. Default: ${{ github.repository }}
.
ref
string
. 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.
token
string
. Personal access token (PAT) used to fetch the repository. Default: ${{ github.token }}
.
fetch-depth
string
. Number of commits to fetch. 0 indicates all history for all branches and tags. Default: 1.
path
string
. Relative path under $GITHUB_WORKSPACE
to place the repository.
submodules
string
. Whether to checkout submodules: true
to checkout submodules or recursive
to recursively checkout submodules.
Only available since version v1
.