GitHub/Self-Hosted Runner

From Omnia
Revision as of 17:10, 22 July 2024 by Kenneth (talk | contribs) (Created page with "https://docs.github.com/github/automating-your-workflow-with-github-actions/hosting-your-own-runners Download: (2.317.0 as of 2024.07.22) <pre> # Create a folder $ mkdir actions-runner && cd actions-runner # Download the latest runner package $ curl -o actions-runner-linux-x64-2.317.0.tar.gz -L https://github.com/actions/runner/releases/download/v2.317.0/actions-runner-linux-x64-2.317.0.tar.gz # Optional: Validate the hash $ echo "9e883d210df8c6028aff475475a457d380353f9...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

https://docs.github.com/github/automating-your-workflow-with-github-actions/hosting-your-own-runners

Download: (2.317.0 as of 2024.07.22)

# Create a folder
$ mkdir actions-runner && cd actions-runner
# Download the latest runner package
$ curl -o actions-runner-linux-x64-2.317.0.tar.gz -L https://github.com/actions/runner/releases/download/v2.317.0/actions-runner-linux-x64-2.317.0.tar.gz
# Optional: Validate the hash
$ echo "9e883d210df8c6028aff475475a457d380353f9d01877d51cc01a17b2a91161d  actions-runner-linux-x64-2.317.0.tar.gz" | shasum -a 256 -c
# Extract the installer
$ tar xzf ./actions-runner-linux-x64-2.317.0.tar.gz

Configure:

# Create the runner and start the configuration experience
$ ./config.sh --url https://github.com/fpe-products/snowbird --token XXXXXXX
# Last step, run it!
$ ./run.sh

Using your self-hosted runner

# Use this YAML in your workflow file for each job
runs-on: self-hosted

Run as Root

./config.sh ...
Must not run with sudo

It is bad practice, but if you need, you can force it to allow to run as root:

export RUNNER_ALLOW_RUNASROOT=1