Skip to content

Commit

Permalink
Merge pull request #116 from crazy-max/buildx-install-private
Browse files Browse the repository at this point in the history
buildx: install from private repo support
  • Loading branch information
crazy-max committed Jun 9, 2023
2 parents 6fc5565 + 8ad595b commit acd3c9d
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/buildx/install.ts
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 acd3c9d

Please sign in to comment.