Skip to content

Commit

Permalink
fix: remove export from install script. (philips-labs#1538)
Browse files Browse the repository at this point in the history
* fix: remove export from install script.
* Add log line to the run as root export
  • Loading branch information
ScottGuymer authored Dec 21, 2021
1 parent 1cd9cd3 commit d32ca1b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
3 changes: 0 additions & 3 deletions modules/runners/templates/install-runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ rm -rf $file_name

${ARM_PATCH}

echo "export RUNNER_ALLOW_RUNASROOT=1"
export RUNNER_ALLOW_RUNASROOT=1

os_id=$(awk -F= '/^ID/{print $2}' /etc/os-release)
if [[ "$os_id" =~ ^ubuntu.* ]]; then
echo "Installing dependencies"
Expand Down
7 changes: 4 additions & 3 deletions modules/runners/templates/start-runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,13 @@ echo "Delete GH Runner token from AWS SSM"
aws ssm delete-parameter --name "$environment"-"$instance_id" --region "$region"

if [ -z "$run_as" ]; then
echo "No user specified, using default ec2-user account"
run_as="ec2-user"
echo "No user specified, using default ec2-user account"
run_as="ec2-user"
fi

if [[ "$run_as" == "root" ]]; then
export RUNNER_ALLOW_RUNASROOT=1
echo "run_as is set to root - export RUNNER_ALLOW_RUNASROOT=1"
export RUNNER_ALLOW_RUNASROOT=1
fi

echo "Configure GH Runner as user $run_as"
Expand Down

0 comments on commit d32ca1b

Please sign in to comment.