mirror of
https://github.com/docker/build-push-action.git
synced 2025-04-19 18:06:46 +00:00
Use --builder
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
parent
b563df09ad
commit
cf9301c704
4 changed files with 7 additions and 27 deletions
|
@ -51,11 +51,3 @@ export async function parseVersion(stdout: string): Promise<string> {
|
|||
}
|
||||
return semver.clean(matches[1]);
|
||||
}
|
||||
|
||||
export async function use(builder: string): Promise<void> {
|
||||
return await exec.exec(`docker`, ['buildx', 'use', '--builder', builder], false).then(res => {
|
||||
if (res.stderr != '' && !res.success) {
|
||||
throw new Error(res.stderr);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -106,6 +106,9 @@ async function getCommonArgs(inputs: Inputs): Promise<Array<string>> {
|
|||
if (inputs.noCache) {
|
||||
args.push('--no-cache');
|
||||
}
|
||||
if (inputs.builder) {
|
||||
args.push('--builder', inputs.builder);
|
||||
}
|
||||
if (inputs.pull) {
|
||||
args.push('--pull');
|
||||
}
|
||||
|
|
|
@ -23,10 +23,6 @@ async function run(): Promise<void> {
|
|||
core.info(`📣 Buildx version: ${buildxVersion}`);
|
||||
|
||||
let inputs: context.Inputs = await context.getInputs();
|
||||
if (inputs.builder) {
|
||||
core.info(`📌 Using builder instance ${inputs.builder}`);
|
||||
await buildx.use(inputs.builder);
|
||||
}
|
||||
|
||||
core.info(`🏃 Starting build...`);
|
||||
const args: string[] = await context.getArgs(inputs, buildxVersion);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue