Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save nicksterious/c4a41ee8415512099edbe54a48ea1c8e to your computer and use it in GitHub Desktop.
Save nicksterious/c4a41ee8415512099edbe54a48ea1c8e to your computer and use it in GitHub Desktop.
Github actions runner on Linode
#!/bin/bash
# <UDF name="REPO_URL" label="Github repo URL" default="" example="https://github.com/YOUR_USERNAME/REPO_NAME" />
# <UDF name="TOKEN" label="Github repo token" default="" example="Shown to you when you start adding your runner (under repo / settings / actions / runners)" />
yum -y install zip unzip wget curl
cd /root/
mkdir actions-runner && cd actions-runner
# Download the latest runner package
curl -O -L https://github.com/actions/runner/releases/download/v2.278.0/actions-runner-linux-x64-2.278.0.tar.gz
# Extract the installer
tar xzf ./actions-runner-linux-x64-2.278.0.tar.gz
# allow it to run as root, you should be safe as long as you only run your own stuff
export RUNNER_ALLOW_RUNASROOT="1"
# install deps
./bin/installdependencies.sh
# configure
./config.sh --unattended --url $REPO_URL --token $TOKEN
# install service
./svc.sh install
# start it up
./svc.sh start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment