mirror of
https://github.com/redhat-actions/buildah-build.git
synced 2025-06-08 10:01:34 +00:00
Make squashing optional
This commit is contained in:
parent
7a95fa7ee0
commit
4a139d5a7a
6 changed files with 22 additions and 10 deletions
|
@ -266,6 +266,7 @@ async function doBuildFromScratch(
|
|||
const workingDir = core.getInput(Inputs.WORKDIR);
|
||||
const envs = getInputList(Inputs.ENVS);
|
||||
const tlsVerify = core.getInput(Inputs.TLS_VERIFY) === "true";
|
||||
const squash = core.getInput(Inputs.SQUASH) === "true";
|
||||
|
||||
const container = await cli.from(baseImage, tlsVerify, extraArgs);
|
||||
const containerId = container.output.replace("\n", "");
|
||||
|
@ -287,7 +288,7 @@ async function doBuildFromScratch(
|
|||
};
|
||||
await cli.config(containerId, newImageConfig);
|
||||
await cli.copy(containerId, content);
|
||||
await cli.commit(containerId, `${newImage}${tagSuffix}`, useOCI);
|
||||
await cli.commit(containerId, `${newImage}${tagSuffix}`, useOCI, squash);
|
||||
builtImage.push(`${newImage}${tagSuffix}`);
|
||||
}
|
||||
}
|
||||
|
@ -301,7 +302,7 @@ async function doBuildFromScratch(
|
|||
};
|
||||
await cli.config(containerId, newImageConfig);
|
||||
await cli.copy(containerId, content);
|
||||
await cli.commit(containerId, newImage, useOCI);
|
||||
await cli.commit(containerId, newImage, useOCI, squash);
|
||||
builtImage.push(newImage);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue