1
0
Fork 0
mirror of https://github.com/docker/build-push-action.git synced 2025-04-22 14:46:39 +02:00
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax 2020-08-16 17:24:31 +02:00
parent 8be103ff82
commit 8913dd9900
No known key found for this signature in database
GPG key ID: 3248E46B6BB8C7F7
3 changed files with 17 additions and 14 deletions

11
dist/index.js generated vendored
View file

@ -1018,12 +1018,13 @@ function run() {
return;
}
const inputs = yield context_1.getInputs();
const args = yield context_1.getArgs(inputs);
if (inputs.builder) {
core.info(`📌 Using builder instance ${inputs.builder}`);
yield buildx.use(inputs.builder);
}
core.info(`🏃 Starting build...`);
yield exec.exec('docker', yield context_1.getArgs(inputs));
yield exec.exec('docker', args);
}
catch (error) {
core.setFailed(error.message);
@ -1436,17 +1437,17 @@ function getArgs(inputs) {
return __awaiter(this, void 0, void 0, function* () {
let args = ['buildx'];
if (inputs.bake) {
args.concat(yield getBakeArgs(inputs));
args.push.apply(args, yield getBakeArgs(inputs));
}
else {
args.concat(yield getBuildArgs(inputs));
args.push.apply(args, yield getBuildArgs(inputs));
}
args.concat(yield getCommonArgs(inputs));
args.push.apply(args, yield getCommonArgs(inputs));
if (!inputs.bake) {
args.push(inputs.context);
}
else {
args.concat(inputs.bakeTargets);
args.push.apply(args, inputs.bakeTargets);
}
return args;
});