mirror of
https://github.com/actions/checkout.git
synced 2026-01-20 15:48:55 +08:00
Add sparse checkout support
This commit is contained in:
parent
230611dbd0
commit
ad6eac3f6b
11 changed files with 128 additions and 0 deletions
|
|
@ -163,6 +163,13 @@ export async function getSource(settings: IGitSourceSettings): Promise<void> {
|
|||
core.endGroup()
|
||||
}
|
||||
|
||||
// Sparse checkout
|
||||
if (settings.sparse) {
|
||||
core.startGroup('Sparse checkout')
|
||||
await git.sparseCheckout(settings.sparseCone, settings.sparse)
|
||||
core.endGroup()
|
||||
}
|
||||
|
||||
// Checkout
|
||||
core.startGroup('Checking out the ref')
|
||||
await git.checkout(checkoutInfo.ref, checkoutInfo.startPoint)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue