mirror of
https://github.com/docker/setup-buildx-action.git
synced 2025-06-28 00:06:42 +02:00
check if driver compatible with keep-state
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
parent
4143b5899b
commit
36590ad0c1
4 changed files with 33 additions and 29 deletions
|
@ -28,6 +28,12 @@ actionsToolkit.run(
|
|||
const standalone = await toolkit.buildx.isStandalone();
|
||||
stateHelper.setStandalone(standalone);
|
||||
|
||||
if (inputs.keepState && inputs.driver !== 'docker-container') {
|
||||
// https://docs.docker.com/reference/cli/docker/buildx/rm/#keep-state
|
||||
throw new Error(`Cannot use keep-state with ${inputs.driver} driver`);
|
||||
}
|
||||
stateHelper.setKeepState(inputs.keepState);
|
||||
|
||||
await core.group(`Docker info`, async () => {
|
||||
try {
|
||||
await Docker.printVersion();
|
||||
|
@ -115,7 +121,6 @@ actionsToolkit.run(
|
|||
});
|
||||
}
|
||||
}
|
||||
stateHelper.setKeepState(inputs.keepState);
|
||||
|
||||
if (inputs.driver !== 'docker') {
|
||||
await core.group(`Creating a new builder instance`, async () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue