Skip to content

Commit

Permalink
buildx: install from private repo support
Browse files Browse the repository at this point in the history
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
  • Loading branch information
crazy-max committed Jun 9, 2023
1 parent 6fc5565 commit 8ad595b
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/buildx/install.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,14 +157,14 @@ export class Install {
throw new Error(`Neither buildx standalone or plugin have been found to build from ref ${gitContext}`);
}

const args = ['build', '--target', 'binaries', '--build-arg', 'BUILDKIT_CONTEXT_KEEP_GIT_DIR=1', '--output', `type=local,dest=${outputDir}`];
if (process.env.GIT_AUTH_TOKEN) {
args.push('--secret', 'id=GIT_AUTH_TOKEN');
}
args.push(gitContext);

//prettier-ignore
return await new Buildx({standalone: buildStandalone}).getCommand([
'build',
'--target', 'binaries',
'--build-arg', 'BUILDKIT_CONTEXT_KEEP_GIT_DIR=1',
'--output', `type=local,dest=${outputDir}`,
gitContext
]);
return await new Buildx({standalone: buildStandalone}).getCommand(args);
}

private async isStandalone(): Promise<boolean> {
Expand Down

0 comments on commit 8ad595b

Please sign in to comment.