mirror of
https://github.com/docker/setup-buildx-action.git
synced 2025-06-28 00:06:42 +02:00
Support to retain cache
Signed-off-by: Balaji Arun <balajia@vt.edu>
This commit is contained in:
parent
3f1544eb9e
commit
4143b5899b
6 changed files with 88 additions and 11 deletions
|
@ -115,6 +115,7 @@ actionsToolkit.run(
|
|||
});
|
||||
}
|
||||
}
|
||||
stateHelper.setKeepState(inputs.keepState);
|
||||
|
||||
if (inputs.driver !== 'docker') {
|
||||
await core.group(`Creating a new builder instance`, async () => {
|
||||
|
@ -249,7 +250,7 @@ actionsToolkit.run(
|
|||
const buildx = new Buildx({standalone: stateHelper.standalone});
|
||||
const builder = new Builder({buildx: buildx});
|
||||
if (await builder.exists(stateHelper.builderName)) {
|
||||
const rmCmd = await buildx.getCommand(['rm', stateHelper.builderName]);
|
||||
const rmCmd = await buildx.getCommand(['rm', stateHelper.builderName, ...(stateHelper.keepState ? ['--keep-state'] : [])]);
|
||||
await Exec.getExecOutput(rmCmd.command, rmCmd.args, {
|
||||
ignoreReturnCode: true
|
||||
}).then(res => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue