Add the ability to setup a caching git-lfs proxy server

This commit is contained in:
Matthew Endsley 2022-10-11 16:52:31 -07:00
parent 1f9a0c22da
commit 5262024a96
6 changed files with 2391 additions and 2354 deletions

View file

@ -182,6 +182,19 @@ export async function getSource(settings: IGitSourceSettings): Promise<void> {
)
core.endGroup()
// LFS URL
if (settings.lfs && settings.lfsurl) {
core.startGroup('Setting LFS URL')
await git
.config('lfs.url', settings.lfsurl, false, false)
.catch(error => {
core.info(
`Failed to initialize safe directory with error: ${error}`
)
})
core.endGroup()
}
// LFS fetch
// Explicit lfs-fetch to avoid slow checkout (fetches one lfs object at a time).
// Explicit lfs fetch will fetch lfs objects in parallel.