mirror of
https://github.com/docker/setup-buildx-action.git
synced 2025-05-10 08:29:30 +02:00
cleanup input to remove builder and temp files
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
parent
03a7a3d9fb
commit
8b13d483f2
7 changed files with 84 additions and 24 deletions
|
@ -16,8 +16,9 @@ actionsToolkit.run(
|
|||
// main
|
||||
async () => {
|
||||
const inputs: context.Inputs = await context.getInputs();
|
||||
const toolkit = new Toolkit();
|
||||
stateHelper.setCleanup(inputs.cleanup);
|
||||
|
||||
const toolkit = new Toolkit();
|
||||
const standalone = await toolkit.buildx.isStandalone();
|
||||
stateHelper.setStandalone(standalone);
|
||||
|
||||
|
@ -164,9 +165,13 @@ actionsToolkit.run(
|
|||
});
|
||||
}
|
||||
|
||||
if (!stateHelper.cleanup) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (stateHelper.builderName.length > 0) {
|
||||
await core.group(`Removing builder`, async () => {
|
||||
const buildx = new Buildx({standalone: /true/i.test(stateHelper.standalone)});
|
||||
const buildx = new Buildx({standalone: stateHelper.standalone});
|
||||
const rmCmd = await buildx.getCommand(['rm', stateHelper.builderName]);
|
||||
await exec
|
||||
.getExecOutput(rmCmd.command, rmCmd.args, {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue