mirror of
https://gitee.com/actions-mirror/docker-setup-buildx-action.git
synced 2024-11-23 13:50:42 +08:00
Add config input
Signed-off-by: Gabriel Martinez <gabrielmartinez@sisti.pt>
This commit is contained in:
parent
583a3147f8
commit
9b365965c1
@ -129,6 +129,7 @@ Following inputs can be used as `step.with` keys
|
|||||||
| `install` | Bool | Sets up `docker build` command as an alias to `docker buildx` (default `false`) |
|
| `install` | Bool | Sets up `docker build` command as an alias to `docker buildx` (default `false`) |
|
||||||
| `use` | Bool | Switch to this builder instance (default `true`) |
|
| `use` | Bool | Switch to this builder instance (default `true`) |
|
||||||
| `endpoint` | String | [Optional address for docker socket](https://github.com/docker/buildx/blob/master/docs/reference/buildx_create.md#description) or context from `docker context ls` |
|
| `endpoint` | String | [Optional address for docker socket](https://github.com/docker/buildx/blob/master/docs/reference/buildx_create.md#description) or context from `docker context ls` |
|
||||||
|
| `config` | String | [Optional config file path](https://github.com/docker/buildx/blob/master/docs/reference/buildx_create.md#config) |
|
||||||
|
|
||||||
> `CSV` type must be a newline-delimited string
|
> `CSV` type must be a newline-delimited string
|
||||||
> ```yaml
|
> ```yaml
|
||||||
|
@ -32,6 +32,9 @@ inputs:
|
|||||||
endpoint:
|
endpoint:
|
||||||
description: 'Optional address for docker socket or context from `docker context ls`'
|
description: 'Optional address for docker socket or context from `docker context ls`'
|
||||||
required: false
|
required: false
|
||||||
|
config:
|
||||||
|
description: 'Optional config file path'
|
||||||
|
required: false
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
name:
|
name:
|
||||||
|
6
dist/index.js
generated
vendored
6
dist/index.js
generated
vendored
@ -554,6 +554,9 @@ function run() {
|
|||||||
if (inputs.endpoint) {
|
if (inputs.endpoint) {
|
||||||
createArgs.push(inputs.endpoint);
|
createArgs.push(inputs.endpoint);
|
||||||
}
|
}
|
||||||
|
if (inputs.config) {
|
||||||
|
createArgs.push('--config', inputs.config);
|
||||||
|
}
|
||||||
yield exec.exec('docker', createArgs);
|
yield exec.exec('docker', createArgs);
|
||||||
core.endGroup();
|
core.endGroup();
|
||||||
core.startGroup(`Booting builder`);
|
core.startGroup(`Booting builder`);
|
||||||
@ -8023,7 +8026,8 @@ function getInputs() {
|
|||||||
'--allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host',
|
'--allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host',
|
||||||
install: /true/i.test(core.getInput('install')),
|
install: /true/i.test(core.getInput('install')),
|
||||||
use: /true/i.test(core.getInput('use')),
|
use: /true/i.test(core.getInput('use')),
|
||||||
endpoint: core.getInput('endpoint')
|
endpoint: core.getInput('endpoint'),
|
||||||
|
config: core.getInput('config')
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -12,6 +12,7 @@ export interface Inputs {
|
|||||||
install: boolean;
|
install: boolean;
|
||||||
use: boolean;
|
use: boolean;
|
||||||
endpoint: string;
|
endpoint: string;
|
||||||
|
config: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function getInputs(): Promise<Inputs> {
|
export async function getInputs(): Promise<Inputs> {
|
||||||
@ -24,7 +25,8 @@ export async function getInputs(): Promise<Inputs> {
|
|||||||
'--allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host',
|
'--allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host',
|
||||||
install: /true/i.test(core.getInput('install')),
|
install: /true/i.test(core.getInput('install')),
|
||||||
use: /true/i.test(core.getInput('use')),
|
use: /true/i.test(core.getInput('use')),
|
||||||
endpoint: core.getInput('endpoint')
|
endpoint: core.getInput('endpoint'),
|
||||||
|
config: core.getInput('config')
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,6 +48,9 @@ async function run(): Promise<void> {
|
|||||||
if (inputs.endpoint) {
|
if (inputs.endpoint) {
|
||||||
createArgs.push(inputs.endpoint);
|
createArgs.push(inputs.endpoint);
|
||||||
}
|
}
|
||||||
|
if (inputs.config) {
|
||||||
|
createArgs.push('--config', inputs.config);
|
||||||
|
}
|
||||||
await exec.exec('docker', createArgs);
|
await exec.exec('docker', createArgs);
|
||||||
core.endGroup();
|
core.endGroup();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user