From 78344167da44cab026d734822217c75bbd322196 Mon Sep 17 00:00:00 2001 From: jo Date: Thu, 16 Sep 2021 21:34:41 +0200 Subject: [PATCH] Allow ci image user to run sudo without password --- .github/workflows/tools.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tools.yml b/.github/workflows/tools.yml index f8a755b7d..270c5be1c 100644 --- a/.github/workflows/tools.yml +++ b/.github/workflows/tools.yml @@ -70,13 +70,17 @@ jobs: DEBIAN_FRONTEND=noninteractive apt-get -y install \ python3 \ python3-pip \ + sudo \ $(cat packages.list) ARG USER=docker ARG UID=1000 ARG GID=1000 - RUN useradd -m ${USER} --uid=${UID} + RUN adduser --disabled-password --uid=${UID} --gecos '' ${USER} && \ + adduser ${USER} sudo && \ + echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers + USER ${UID}:${GID} WORKDIR /home/${USER} EOF