Skip to content

Instantly share code, notes, and snippets.

@jniltinho
Last active March 29, 2022 22:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jniltinho/86eb0a11af05b71bc6cac967147e436b to your computer and use it in GitHub Desktop.
Save jniltinho/86eb0a11af05b71bc6cac967147e436b to your computer and use it in GitHub Desktop.
Install GitHub Actions Runner
#!/bin/bash
## Install GitHub Actions Runner
## https://docs.github.com/en/actions/hosting-your-own-runners/configuring-the-self-hosted-runner-application-as-a-service
## Install as root
## Install Docker
apt-get update
apt-get upgrade
apt-get install -y apt-transport-https ca-certificates curl software-properties-common docker.io socat
systemctl start docker
systemctl enable docker
useradd --comment 'GitHub Runner' --create-home github-runner --shell /bin/bash
gpasswd -a github-runner docker
cd /home/github-runner
su - github-runner -c "curl -o actions-runner-linux-x64-2.289.1.tar.gz -L https://github.com/actions/runner/releases/download/v2.289.1/actions-runner-linux-x64-2.289.1.tar.gz"
su - github-runner -c "tar xvzf ./actions-runner-linux-x64-2.289.1.tar.gz"
su - github-runner -c "./config.sh --url https://github.com/name_repo/projectA --token TOKEN"
./svc.sh install
./svc.sh status
./svc.sh start
./svc.sh status
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment