Skip to content

Commit

Permalink
remove hacky use of /root/ homedir for new user
Browse files Browse the repository at this point in the history
  • Loading branch information
cre4ture committed Mar 9, 2024
1 parent 4d66813 commit 7f7a263
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/openbsd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,11 @@ jobs:
REPO_NAME=${GITHUB_WORKSPACE##*/}
WORKSPACE_PARENT="/home/runner/work/${REPO_NAME}"
WORKSPACE="${WORKSPACE_PARENT}/${REPO_NAME}"
HOMEDIR_VM="/home/${TEST_USER}/"
#
useradd -d /root/ -c "Coreutils user to build" -g wheel ${TEST_USER}
chown -R ${TEST_USER}:wheel /root/ "${WORKSPACE_PARENT}"/
mkdir "$HOMEDIR_VM"
useradd -d "$HOMEDIR_VM" -c "Coreutils user to build" -g wheel ${TEST_USER}
chown -R ${TEST_USER}:wheel "$HOMEDIR_VM" "${WORKSPACE_PARENT}"/
whoami
#
# Further work needs to be done in a sudo as we are changing users
Expand Down Expand Up @@ -155,10 +157,11 @@ jobs:
REPO_NAME=${GITHUB_WORKSPACE##*/}
WORKSPACE_PARENT="/home/runner/work/${REPO_NAME}"
WORKSPACE="${WORKSPACE_PARENT}/${REPO_NAME}"
HOMEDIR_VM="/home/${TEST_USER}"
#
useradd -d /root/ -c "Coreutils user to build" -g wheel ${TEST_USER}
# chown -R ${TEST_USER}:wheel /root/ "${WORKSPACE_PARENT}"/
chown -R ${TEST_USER}:wheel /root/ "${WORKSPACE_PARENT}"/
mkdir "$HOMEDIR_VM"
useradd -d "$HOMEDIR_VM" -c "Coreutils user to build" -g wheel ${TEST_USER}
chown -R ${TEST_USER}:wheel "$HOMEDIR_VM" "${WORKSPACE_PARENT}"/
whoami
#
# Further work needs to be done in a sudo as we are changing users
Expand Down

0 comments on commit 7f7a263

Please sign in to comment.