mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-06-05 21:03:40 +00:00
16
.github/actions/checkout/action.yml
vendored
16
.github/actions/checkout/action.yml
vendored
@@ -103,14 +103,14 @@ runs:
|
|||||||
await run('sudo', 'mount', '-t', 'tmpfs', 'tmpfs', 'nixpkgs')
|
await run('sudo', 'mount', '-t', 'tmpfs', 'tmpfs', 'nixpkgs')
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create all worktrees in parallel.
|
// Git worktree setup can race when multiple worktrees are created and
|
||||||
await Promise.all(
|
// initialized at the same time against one repository. See #511286.
|
||||||
commits.map(async ({ sha, path }) => {
|
// Keep the setup sequential so shared repo config updates cannot contend.
|
||||||
await run('git', 'worktree', 'add', join('nixpkgs', path), sha, '--no-checkout')
|
for (const { sha, path } of commits) {
|
||||||
await run('git', '-C', join('nixpkgs', path), 'sparse-checkout', 'disable')
|
await run('git', 'worktree', 'add', join('nixpkgs', path), sha, '--no-checkout')
|
||||||
await run('git', '-C', join('nixpkgs', path), 'checkout', '--progress')
|
await run('git', '-C', join('nixpkgs', path), 'sparse-checkout', 'disable')
|
||||||
})
|
await run('git', '-C', join('nixpkgs', path), 'checkout', '--progress')
|
||||||
)
|
}
|
||||||
|
|
||||||
// Apply pin bump to untrusted worktree
|
// Apply pin bump to untrusted worktree
|
||||||
if (pin_bump_sha) {
|
if (pin_bump_sha) {
|
||||||
|
|||||||
Reference in New Issue
Block a user