mirror of
https://github.com/docker/build-push-action.git
synced 2025-04-19 09:56:46 +00:00
Add install input to set buildx as default builder (#71)
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
parent
925fee3dc9
commit
5290010a6f
5 changed files with 32 additions and 6 deletions
5
setup-buildx/dist/index.js
generated
vendored
5
setup-buildx/dist/index.js
generated
vendored
|
@ -2492,6 +2492,7 @@ function run() {
|
|||
return;
|
||||
}
|
||||
const buildxVer = core.getInput('buildx-version') || 'latest';
|
||||
const install = /true/i.test(core.getInput('install'));
|
||||
const dockerConfigHome = process.env.DOCKER_CONFIG || path.join(os.homedir(), '.docker');
|
||||
yield installer.buildx(buildxVer, dockerConfigHome);
|
||||
core.info('📣 Buildx info');
|
||||
|
@ -2508,6 +2509,10 @@ function run() {
|
|||
]);
|
||||
core.info('🏃 Booting builder...');
|
||||
yield exec.exec('docker', ['buildx', 'inspect', '--bootstrap']);
|
||||
if (install) {
|
||||
core.info('🤝 Setting buildx as default builder...');
|
||||
yield exec.exec('docker', ['buildx', 'install']);
|
||||
}
|
||||
core.info('🐳 Docker info');
|
||||
yield exec.exec('docker', ['info']);
|
||||
core.info('🛒 Extracting available platforms...');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue