Skip to content

Commit

Permalink
runner setup
Browse files Browse the repository at this point in the history
  • Loading branch information
unkcpz committed Sep 8, 2023
1 parent 783911b commit 3266e81
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions aarch64-runner/setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/bash
set -ex

GITHUB_RUNNER_USER="runner-user"

if [ "$EUID" -ne 0 ]; then
echo "Please run as root"
exit 1
fi

# Install homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"


echo "Setting up runner-user, who will run GitHub Actions runner"
adduser --disabled-password --gecos "" ${GITHUB_RUNNER_USER}
mkdir /home/${GITHUB_RUNNER_USER}/.ssh/
cp "/home/${SUDO_USER}/.ssh/authorized_keys" "/home/${GITHUB_RUNNER_USER}/.ssh/authorized_keys"
chown --recursive ${GITHUB_RUNNER_USER}:${GITHUB_RUNNER_USER} /home/${GITHUB_RUNNER_USER}/.ssh

echo "Setting up python3"
brew install python3
curl -sS https://bootstrap.pypa.io/get-pip.py | python3

echo "Setting up docker"
brew install docker

usermod -aG docker ${GITHUB_RUNNER_USER}
chmod 666 /var/run/docker.sock

0 comments on commit 3266e81

Please sign in to comment.