From 46bf3297bfd35f601ecb1a05f724f1b15cd1aa5e Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Thu, 13 Aug 2020 10:43:24 +0200 Subject: [PATCH] Update generated content Signed-off-by: CrazyMax --- setup-buildx/dist/index.js | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/setup-buildx/dist/index.js b/setup-buildx/dist/index.js index 0bb7ead..e87f9e7 100644 --- a/setup-buildx/dist/index.js +++ b/setup-buildx/dist/index.js @@ -2489,14 +2489,14 @@ function run() { core.setFailed('Only supported on linux platform'); return; } - const buildxVer = core.getInput('buildx-version'); - const driver = core.getInput('driver') || 'docker-container'; - const driverOpt = core.getInput('driver-opt'); - const install = /true/i.test(core.getInput('install')); - const use = /true/i.test(core.getInput('use')); + const bxVersion = core.getInput('version'); + const bxDriver = core.getInput('driver') || 'docker-container'; + const bxDriverOpt = core.getInput('driver-opt'); + const bxInstall = /true/i.test(core.getInput('install')); + const bxUse = /true/i.test(core.getInput('use')); const dockerConfigHome = process.env.DOCKER_CONFIG || path.join(os.homedir(), '.docker'); - if (!(yield buildx.isAvailable()) || buildxVer) { - yield buildx.install(buildxVer || 'latest', dockerConfigHome); + if (!(yield buildx.isAvailable()) || bxVersion) { + yield buildx.install(bxVersion || 'latest', dockerConfigHome); } core.info('📣 Buildx info'); yield exec.exec('docker', ['buildx', 'version'], false); @@ -2504,17 +2504,17 @@ function run() { core.setOutput('name', builderName); stateHelper.setBuilderName(builderName); core.info('🔨 Creating a new builder instance...'); - let createArgs = ['buildx', 'create', '--name', builderName, '--driver', driver]; - if (driverOpt) { - createArgs.push('--driver-opt', driverOpt); + let createArgs = ['buildx', 'create', '--name', builderName, '--driver', bxDriver]; + if (bxDriverOpt) { + createArgs.push('--driver-opt', bxDriverOpt); } - if (use) { + if (bxUse) { createArgs.push('--use'); } yield exec.exec('docker', createArgs, false); core.info('🏃 Booting builder...'); yield exec.exec('docker', ['buildx', 'inspect', '--bootstrap'], false); - if (install) { + if (bxInstall) { core.info('🤝 Setting buildx as default builder...'); yield exec.exec('docker', ['buildx', 'install'], false); }