From 583e11daec534fab8ff7ed0fbf860d1a676c05dd Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Tue, 8 Sep 2020 15:52:09 +0200 Subject: [PATCH] Rename endpoint Signed-off-by: CrazyMax --- .github/workflows/ci.yml | 4 ++-- README.md | 2 +- action.yml | 4 ++-- dist/index.js | 6 +++--- src/context.ts | 4 ++-- src/main.ts | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 42026b5..e5de820 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -143,7 +143,7 @@ jobs: docker buildx inspect | grep Driver | grep docker docker buildx inspect | grep Status | grep running - context: + endpoint: runs-on: ubuntu-latest services: dind: @@ -174,7 +174,7 @@ jobs: name: Set up Docker Buildx uses: ./ with: - context: mycontext + endpoint: mycontext with-qemu: runs-on: ubuntu-latest diff --git a/README.md b/README.md index 5b96039..9c8a316 100644 --- a/README.md +++ b/README.md @@ -134,7 +134,7 @@ Following inputs can be used as `step.with` keys | `buildkitd-flags` | String | [Flags for buildkitd](https://github.com/moby/buildkit/blob/master/docs/buildkitd.toml.md) daemon (since [buildx v0.3.0](https://github.com/docker/buildx/releases/tag/v0.3.0)) | | `install` | Bool | Sets up `docker build` command as an alias to `docker buildx` (default `false`) | | `use` | Bool | Switch to this builder instance (default `true`) | -| `context` | String | [Name of a context](https://github.com/docker/buildx#buildx-create-options-contextendpoint) from `docker context ls` or an endpoint as the address for docker socket (eg. `DOCKER_HOST` value) | +| `endpoint` | String | [Address for docker socket](https://github.com/docker/buildx#buildx-create-options-contextendpoint) or context from `docker context ls` (eg. `DOCKER_HOST` value) | > `CSV` type must be a newline-delimited string > ```yaml diff --git a/action.yml b/action.yml index 37f6a51..6c38768 100644 --- a/action.yml +++ b/action.yml @@ -29,8 +29,8 @@ inputs: description: 'Switch to this builder instance' default: 'true' required: false - context: - description: 'Name of a context from docker context ls or an endpoint as the address for docker socket (eg. DOCKER_HOST value)' + endpoint: + description: 'Address for docker socket or context from `docker context ls (eg. DOCKER_HOST value)' required: false outputs: diff --git a/dist/index.js b/dist/index.js index 1e12345..44c944f 100644 --- a/dist/index.js +++ b/dist/index.js @@ -534,8 +534,8 @@ function run() { if (inputs.use) { createArgs.push('--use'); } - if (inputs.context) { - createArgs.push(inputs.context); + if (inputs.endpoint) { + createArgs.push(inputs.endpoint); } yield exec.exec('docker', createArgs); core.info('🏃 Booting builder...'); @@ -6581,7 +6581,7 @@ function getInputs() { '--allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host', install: /true/i.test(core.getInput('install')), use: /true/i.test(core.getInput('use')), - context: core.getInput('context') + endpoint: core.getInput('endpoint') }; }); } diff --git a/src/context.ts b/src/context.ts index a856601..4a39951 100644 --- a/src/context.ts +++ b/src/context.ts @@ -11,7 +11,7 @@ export interface Inputs { buildkitdFlags: string; install: boolean; use: boolean; - context: string; + endpoint: string; } export async function getInputs(): Promise { @@ -24,7 +24,7 @@ export async function getInputs(): Promise { '--allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host', install: /true/i.test(core.getInput('install')), use: /true/i.test(core.getInput('use')), - context: core.getInput('context') + endpoint: core.getInput('endpoint') }; } diff --git a/src/main.ts b/src/main.ts index 3bbedf2..c9cc0cc 100644 --- a/src/main.ts +++ b/src/main.ts @@ -42,8 +42,8 @@ async function run(): Promise { if (inputs.use) { createArgs.push('--use'); } - if (inputs.context) { - createArgs.push(inputs.context); + if (inputs.endpoint) { + createArgs.push(inputs.endpoint); } await exec.exec('docker', createArgs);