- Adding paramater for specifying specific working directory on the runner. This is useful for windows runners in which the working directory is too long and causing issues with npm and other build tools.
## v2.3.1
## v2.3.1
- [Fix default branch resolution for .wiki and when using SSH](https://github.com/actions/checkout/pull/284)
- [Fix default branch resolution for .wiki and when using SSH](https://github.com/actions/checkout/pull/284)
In the examples below, use ***LexisNexis-GHA-Public/LNRSCheckout@v2.3.4.1*** instead.
This action checks-out your repository under `$GITHUB_WORKSPACE`, so your workflow can access it.
This action checks-out your repository under `$GITHUB_WORKSPACE`, so your workflow can access it.
@ -12,6 +10,22 @@ The auth token is persisted in the local git config. This enables your scripts t
When Git 2.18 or higher is not in your PATH, falls back to the REST API to download the files.
When Git 2.18 or higher is not in your PATH, falls back to the REST API to download the files.
## A note about your `$GITHUB_WORKSPACE`
On windows runner's this path is the working directory of your github runner + repo name x2. The issue is that long repo names may result in exceeding the windows file name length restrictions, expecially if you count adding npm installers and other package management systems. The naming format is the same for linux/macOS runners, however they do not have the same limitations Windows has.
This particular codebase has been modified to allow the `path` parameter to use parent folder structure.
path: '..\..\repo-workingdir'
allow_parent_path: true
Results in a working directory:
d:\gh\01\_work\repo-workingdir
In the end this is better than what we had before. However the original working directory will still be required. Also note it's possible this can be dangerous so be careful using this feature.
# What's new
# What's new
- Improved performance
- Improved performance
@ -82,9 +96,14 @@ Refer [here](https://github.com/actions/checkout/blob/v1/README.md) for previous
# Default: true
# Default: true
persist-credentials: ''
persist-credentials: ''
# Relative path under $GITHUB_WORKSPACE to place the repository
# Relative path under the workspace folder to place the repository
path: ''
path: ''
# allows path option to result in a path that is a parent of the working
# directory. This may have unforseen consequences.
# Default: false
allow_parent_path: ''
# Whether to execute `git clean -ffdx && git reset --hard HEAD` before fetching
# Whether to execute `git clean -ffdx && git reset --hard HEAD` before fetching