Unrelated fixes for CI
This commit is contained in:
parent
0aa98279d6
commit
eacca7d692
@ -2,7 +2,8 @@
|
|||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
# This isn't set by default.
|
# This isn't set by default.
|
||||||
export USER="$(whoami)"
|
USER="$(whoami)"
|
||||||
|
export USER
|
||||||
|
|
||||||
if [ "${DOCKER_USER-}" != "$USER" ]; then
|
if [ "${DOCKER_USER-}" != "$USER" ]; then
|
||||||
echo "$DOCKER_USER ALL=(ALL) NOPASSWD:ALL" | sudo tee -a /etc/sudoers.d/nopasswd > /dev/null
|
echo "$DOCKER_USER ALL=(ALL) NOPASSWD:ALL" | sudo tee -a /etc/sudoers.d/nopasswd > /dev/null
|
||||||
@ -11,7 +12,7 @@ if [ "${DOCKER_USER-}" != "$USER" ]; then
|
|||||||
sudo usermod --login "$DOCKER_USER" coder
|
sudo usermod --login "$DOCKER_USER" coder
|
||||||
sudo groupmod -n "$DOCKER_USER" coder
|
sudo groupmod -n "$DOCKER_USER" coder
|
||||||
|
|
||||||
export USER="$(whoami)"
|
USER="$DOCKER_USER"
|
||||||
|
|
||||||
sudo sed -i "/coder/d" /etc/sudoers.d/nopasswd
|
sudo sed -i "/coder/d" /etc/sudoers.d/nopasswd
|
||||||
sudo sed -i "s/coder/$DOCKER_USER/g" /etc/fixuid/config.yml
|
sudo sed -i "s/coder/$DOCKER_USER/g" /etc/fixuid/config.yml
|
||||||
|
Reference in New Issue
Block a user