From 8041be77764ac7ff0c841c464daf17859f0f3790 Mon Sep 17 00:00:00 2001 From: "radoslaw.lisowski@schibsted.pl" Date: Fri, 10 Jul 2026 12:25:44 +0200 Subject: [PATCH 1/3] feat: add dockerTty input to allocate pseudo-TTY for Docker runs --- README.md | 6 ++++++ action.yml | 6 ++++++ src/input.ts | 4 ++++ src/renovate.ts | 10 ++++++---- 4 files changed, 22 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 34822dfc673..aabf4d1252b 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ GitHub Action to run Renovate self-hosted. - [`docker-cmd-file`](#docker-cmd-file) - [`docker-network`](#docker-network) - [`docker-socket-host-path`](#docker-socket-host-path) + - [`dockerTty`](#dockertty) - [`docker-user`](#docker-user) - [`docker-volumes`](#docker-volumes) - [`env-regex`](#env-regex) @@ -120,6 +121,11 @@ Allows the overriding of the host path for the Docker socket that is mounted int Useful on systems where the host Docker socket is located somewhere other than `/var/run/docker.sock` (the default). Only applicable when `mount-docker-socket` is true. +### `dockerTty` + +Defaults to `true`. When enabled, Docker commands are run with `-t` (allocate pseudo-TTY). +Set to `false` to disable TTY allocation. + ### `docker-user` Specify a user (or user-id) to run docker command. diff --git a/action.yml b/action.yml index 1131e10ec85..7f5cd1bbeab 100644 --- a/action.yml +++ b/action.yml @@ -61,6 +61,12 @@ inputs: Docker volume mounts. Default to /tmp:/tmp default: /tmp:/tmp required: false + dockerTty: + description: | + Allocate a pseudo-TTY (`-t`) for Docker runs. + Set to `false` to disable TTY allocation. + default: 'true' + required: false runs: using: node24 diff --git a/src/input.ts b/src/input.ts index ee988b6cccf..e573f9d38c8 100644 --- a/src/input.ts +++ b/src/input.ts @@ -96,6 +96,10 @@ export class Input { return getInput('docker-network'); } + dockerTty(): boolean { + return getInput('dockerTty') !== 'false'; + } + /** * Convert to environment variables. * diff --git a/src/renovate.ts b/src/renovate.ts index 419ce53de83..b5464374ca7 100644 --- a/src/renovate.ts +++ b/src/renovate.ts @@ -1,8 +1,8 @@ import { exec, getExecOutput } from '@actions/exec'; -import { Docker } from './docker'; -import { Input } from './input'; import fs from 'node:fs/promises'; import path from 'node:path'; +import { Docker } from './docker'; +import { Input } from './input'; export class Renovate { static dockerGroupRegex = /^docker:x:(?[1-9][0-9]*):/m; @@ -15,7 +15,8 @@ export class Renovate { } async runDockerContainerForVersion(): Promise { - const command = `docker run -t --rm ${this.docker.image()} --version`; + const ttyArgument = this.input.dockerTty() ? '-t ' : ''; + const command = `docker run ${ttyArgument}--rm ${this.docker.image()} --version`; const { exitCode, stdout } = await getExecOutput(command); if (exitCode !== 0) { @@ -87,7 +88,8 @@ export class Renovate { dockerArguments.push(dockerCmd); } - const command = `docker run -t ${dockerArguments.join(' ')}`; + const ttyArgument = this.input.dockerTty() ? '-t ' : ''; + const command = `docker run ${ttyArgument}${dockerArguments.join(' ')}`; const code = await exec(command); if (code !== 0) { From f5ceb4cf3c3f98d7749878341959557852880592 Mon Sep 17 00:00:00 2001 From: "radoslaw.lisowski@schibsted.pl" Date: Fri, 10 Jul 2026 12:30:04 +0200 Subject: [PATCH 2/3] fix: rename dockerTty input to docker-tty for consistency --- README.md | 4 ++-- action.yml | 2 +- src/input.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index aabf4d1252b..eacb595c896 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ GitHub Action to run Renovate self-hosted. - [`docker-cmd-file`](#docker-cmd-file) - [`docker-network`](#docker-network) - [`docker-socket-host-path`](#docker-socket-host-path) - - [`dockerTty`](#dockertty) + - [`docker-tty`](#docker-tty) - [`docker-user`](#docker-user) - [`docker-volumes`](#docker-volumes) - [`env-regex`](#env-regex) @@ -121,7 +121,7 @@ Allows the overriding of the host path for the Docker socket that is mounted int Useful on systems where the host Docker socket is located somewhere other than `/var/run/docker.sock` (the default). Only applicable when `mount-docker-socket` is true. -### `dockerTty` +### `docker-tty` Defaults to `true`. When enabled, Docker commands are run with `-t` (allocate pseudo-TTY). Set to `false` to disable TTY allocation. diff --git a/action.yml b/action.yml index 7f5cd1bbeab..198580cbc2c 100644 --- a/action.yml +++ b/action.yml @@ -61,7 +61,7 @@ inputs: Docker volume mounts. Default to /tmp:/tmp default: /tmp:/tmp required: false - dockerTty: + docker-tty: description: | Allocate a pseudo-TTY (`-t`) for Docker runs. Set to `false` to disable TTY allocation. diff --git a/src/input.ts b/src/input.ts index e573f9d38c8..c1ef3a4aa60 100644 --- a/src/input.ts +++ b/src/input.ts @@ -97,7 +97,7 @@ export class Input { } dockerTty(): boolean { - return getInput('dockerTty') !== 'false'; + return getInput('docker-tty') !== 'false'; } /** From acb6cffd5984d87d53fed4675b2b13b86076e884 Mon Sep 17 00:00:00 2001 From: "radoslaw.lisowski@schibsted.pl" Date: Mon, 13 Jul 2026 07:58:52 +0200 Subject: [PATCH 3/3] style: fixed autoreformatted imports --- src/renovate.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/renovate.ts b/src/renovate.ts index b5464374ca7..e86a43aef0d 100644 --- a/src/renovate.ts +++ b/src/renovate.ts @@ -1,8 +1,8 @@ import { exec, getExecOutput } from '@actions/exec'; -import fs from 'node:fs/promises'; -import path from 'node:path'; import { Docker } from './docker'; import { Input } from './input'; +import fs from 'node:fs/promises'; +import path from 'node:path'; export class Renovate { static dockerGroupRegex = /^docker:x:(?[1-9][0-9]*):/m;