mirror of
https://github.com/actions/checkout.git
synced 2025-06-07 17:48:45 +08:00
Compare commits
3 Commits
bae39240ba
...
df1915ad6f
Author | SHA1 | Date | |
---|---|---|---|
|
df1915ad6f | ||
|
cbb722410c | ||
|
38cc68387c |
@ -212,7 +212,7 @@ Please refer to the [release page](https://github.com/actions/checkout/releases/
|
|||||||
repository: my-org/my-tools
|
repository: my-org/my-tools
|
||||||
path: my-tools
|
path: my-tools
|
||||||
```
|
```
|
||||||
> - If your secondary repository is private you will need to add the option noted in [Checkout multiple repos (private)](#Checkout-multiple-repos-private)
|
> - If your secondary repository is private or internal you will need to add the option noted in [Checkout multiple repos (private)](#Checkout-multiple-repos-private)
|
||||||
|
|
||||||
## Checkout multiple repos (nested)
|
## Checkout multiple repos (nested)
|
||||||
|
|
||||||
@ -226,7 +226,7 @@ Please refer to the [release page](https://github.com/actions/checkout/releases/
|
|||||||
repository: my-org/my-tools
|
repository: my-org/my-tools
|
||||||
path: my-tools
|
path: my-tools
|
||||||
```
|
```
|
||||||
> - If your secondary repository is private you will need to add the option noted in [Checkout multiple repos (private)](#Checkout-multiple-repos-private)
|
> - If your secondary repository is private or internal you will need to add the option noted in [Checkout multiple repos (private)](#Checkout-multiple-repos-private)
|
||||||
|
|
||||||
## Checkout multiple repos (private)
|
## Checkout multiple repos (private)
|
||||||
|
|
||||||
|
@ -44,6 +44,7 @@ export interface IGitCommandManager {
|
|||||||
getWorkingDirectory(): string
|
getWorkingDirectory(): string
|
||||||
init(): Promise<void>
|
init(): Promise<void>
|
||||||
isDetached(): Promise<boolean>
|
isDetached(): Promise<boolean>
|
||||||
|
lfsCheckout(): Promise<void>
|
||||||
lfsFetch(ref: string): Promise<void>
|
lfsFetch(ref: string): Promise<void>
|
||||||
lfsInstall(): Promise<void>
|
lfsInstall(): Promise<void>
|
||||||
log1(format?: string): Promise<string>
|
log1(format?: string): Promise<string>
|
||||||
@ -340,6 +341,10 @@ class GitCommandManager {
|
|||||||
return !output.stdout.trim().startsWith('refs/heads/')
|
return !output.stdout.trim().startsWith('refs/heads/')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async lfsCheckout(): Promise<void> {
|
||||||
|
await this.execGit(['lfs', 'checkout'])
|
||||||
|
}
|
||||||
|
|
||||||
async lfsFetch(ref: string): Promise<void> {
|
async lfsFetch(ref: string): Promise<void> {
|
||||||
const args = ['lfs', 'fetch', 'origin', ref]
|
const args = ['lfs', 'fetch', 'origin', ref]
|
||||||
|
|
||||||
|
@ -232,6 +232,11 @@ export async function getSource(settings: IGitSourceSettings): Promise<void> {
|
|||||||
await git.checkout(checkoutInfo.ref, checkoutInfo.startPoint)
|
await git.checkout(checkoutInfo.ref, checkoutInfo.startPoint)
|
||||||
core.endGroup()
|
core.endGroup()
|
||||||
|
|
||||||
|
// LFS checkout
|
||||||
|
core.startGroup('Checking out LFS objects')
|
||||||
|
await git.lfsCheckout()
|
||||||
|
core.endGroup()
|
||||||
|
|
||||||
// Submodules
|
// Submodules
|
||||||
if (settings.submodules) {
|
if (settings.submodules) {
|
||||||
// Temporarily override global config
|
// Temporarily override global config
|
||||||
|
Loading…
x
Reference in New Issue
Block a user