diff --git a/dist/index.js b/dist/index.js index 1f68c0df391..e59d196ed63 100644 --- a/dist/index.js +++ b/dist/index.js @@ -26317,6 +26317,9 @@ class Input { mountDockerSocket() { return core.getInput('mount-docker-socket') === 'true'; } + dockerSocketHostPath() { + return core.getInput('docker-socket-host-path') || '/var/run/docker.sock'; + } getDockerCmdFile() { const cmdFile = core.getInput('docker-cmd-file'); return !!cmdFile && cmdFile !== '' ? path_1.default.resolve(cmdFile) : null; @@ -26404,7 +26407,12 @@ class Renovate { dockerArguments.push(`--env ${configurationFile.key}=${mountPath}`, `--volume ${configurationFile.value}:${mountPath}`); } if (this.input.mountDockerSocket()) { - dockerArguments.push('--volume /var/run/docker.sock:/var/run/docker.sock', `--group-add ${await this.getDockerGroupId()}`); + const sockPath = this.input.dockerSocketHostPath(); + const stat = await promises_1.default.stat(sockPath); + if (!stat.isSocket()) { + throw new Error(`docker socket host path '${sockPath}' MUST exist and be a socket`); + } + dockerArguments.push(`--volume ${sockPath}:/var/run/docker.sock`, `--group-add ${await this.getDockerGroupId()}`); } const dockerCmdFile = this.input.getDockerCmdFile(); let dockerCmd = null; diff --git a/package.json b/package.json index b6fec2b4c0b..c875caa1d6d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "github-action", - "version": "40.2.11", + "version": "40.3.0", "private": true, "description": "GitHub Action to run Renovate self-hosted.", "homepage": "https://github.com/renovatebot/github-action#readme",