diff --git a/README.md b/README.md index 9963bbf..5a494e0 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,7 @@ ___ * [Define custom `limactl start` arguments (macOS)](#define-custom-limactl-start-arguments-macos) * [Customizing](#customizing) * [inputs](#inputs) + * [outputs](#outputs) * [Contributing](#contributing) * [License](#license) @@ -106,6 +107,14 @@ The following inputs can be used as `step.with` keys | `daemon-config` | String | | [Docker daemon JSON configuration](https://docs.docker.com/engine/reference/commandline/dockerd/#daemon-configuration-file) | | `context` | String | `setup-docker-action` | Docker context name. | +### outputs + +The following outputs are available + +| Name | Type | Description | +|--------|--------|--------------------| +| `sock` | String | Docker socket path | + ## Contributing Want to contribute? Awesome! The most basic way to show your support is to star diff --git a/action.yml b/action.yml index dce4938..b5224c9 100644 --- a/action.yml +++ b/action.yml @@ -21,6 +21,10 @@ inputs: description: 'Docker context name. (default setup-docker-action)' required: false +outputs: + sock: + description: "Docker socket path" + runs: using: 'node20' main: 'dist/index.js' diff --git a/src/main.ts b/src/main.ts index 27f259e..f1c2b76 100644 --- a/src/main.ts +++ b/src/main.ts @@ -34,7 +34,11 @@ actionsToolkit.run( } if (toolDir) { stateHelper.setRunDir(runDir); - await install.install(); + const sockPath = await install.install(); + await core.group(`Setting outputs`, async () => { + core.info(`sock=${sockPath}`); + core.setOutput('sock', sockPath); + }); } await core.group(`Docker info`, async () => {