Compute args order

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax 2020-08-16 22:41:18 +02:00
parent 444d7e9909
commit 1ca381eec1
No known key found for this signature in database
GPG Key ID: 3248E46B6BB8C7F7
2 changed files with 2 additions and 4 deletions

2
dist/index.js generated vendored
View File

@ -5660,13 +5660,13 @@ function run() {
return; return;
} }
let inputs = yield context_1.getInputs(); let inputs = yield context_1.getInputs();
const args = yield context_1.getArgs(inputs);
if (inputs.builder) { if (inputs.builder) {
core.info(`📌 Using builder instance ${inputs.builder}`); core.info(`📌 Using builder instance ${inputs.builder}`);
yield buildx.use(inputs.builder); yield buildx.use(inputs.builder);
} }
inputs = yield github.restoreCache(inputs); inputs = yield github.restoreCache(inputs);
core.info(`🏃 Starting build...`); core.info(`🏃 Starting build...`);
const args = yield context_1.getArgs(inputs);
yield exec.exec('docker', args); yield exec.exec('docker', args);
} }
catch (error) { catch (error) {

View File

@ -19,16 +19,14 @@ async function run(): Promise<void> {
} }
let inputs: Inputs = await getInputs(); let inputs: Inputs = await getInputs();
const args: string[] = await getArgs(inputs);
if (inputs.builder) { if (inputs.builder) {
core.info(`📌 Using builder instance ${inputs.builder}`); core.info(`📌 Using builder instance ${inputs.builder}`);
await buildx.use(inputs.builder); await buildx.use(inputs.builder);
} }
inputs = await github.restoreCache(inputs); inputs = await github.restoreCache(inputs);
core.info(`🏃 Starting build...`); core.info(`🏃 Starting build...`);
const args: string[] = await getArgs(inputs);
await exec.exec('docker', args); await exec.exec('docker', args);
} catch (error) { } catch (error) {
core.setFailed(error.message); core.setFailed(error.message);