From d2182b9ac87133ba4e13fabf4c264e4908c82d4b Mon Sep 17 00:00:00 2001 From: hackercat Date: Sun, 4 Apr 2021 13:53:53 +0000 Subject: [PATCH] fix: add `USER` and `RUNNER_USER` to `/etc/environment` --- linux/ubuntu/act/Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/linux/ubuntu/act/Dockerfile b/linux/ubuntu/act/Dockerfile index 6556254..8f9fa10 100644 --- a/linux/ubuntu/act/Dockerfile +++ b/linux/ubuntu/act/Dockerfile @@ -17,6 +17,8 @@ SHELL [ "/bin/bash", "-c" ] # > setup environment required for GitHub Actions RUN set -Eeuxo pipefail \ && printf "Build started\n" \ + && echo "USER=$(whoami)" | tee -a /etc/environment \ + && echo "RUNNER_USER=$(whoami)" | tee -a /etc/environment \ && ImageOS=${DISTRIB_ID}$(echo ${DISTRIB_RELEASE} | cut -d'.' -f 1) \ && echo "IMAGE_OS=$ImageOS" | tee -a /etc/environment \ && echo "ImageOS=$ImageOS" | tee -a /etc/environment \ @@ -71,6 +73,8 @@ RUN set -Eeuxo pipefail \ # > Home repository LABEL org.opencontainers.image.source="https://github.com/catthehacker/docker_images" +USER root + SHELL [ "/bin/bash", "--login", "-c" ] # > Force bash with environment