Replace Github runner by self hosted runner - ji-it/CloudTides GitHub Wiki
-
To add a self-hosted runner to a user repository, you must be the repository owner
-
Open settings-Actions and click Add Runner
- Choose the right os and arch
- If you want to run workflows that use Docker container actions or service containers, you must use a Linux machine and Docker must be installed.
- Configuration must not run with sudo or root user
- Use the repo name and token got from the previous step
useradd runner
su runner
mkdir -p /home/runner/actions-runner && cd /home/runner/actions-runner
curl -O -L https://github.com/actions/runner/releases/download/v2.267.1/actions-runner-linux-x64-2.267.1.tar.gz
tar xzf ./actions-runner-linux-x64-2.267.1.tar.gz
# use the repo name and token got from the previous step
./config.sh --url https://github.com/<path/to/repo> --token <token>
./run.sh
- To use systemd daemon, make sure your system has systemd
su
./svc.sh install
./svc.sh start
- Then you can see the runner is registered successfully
- replace
runs-on: ubuntu-latest
byruns-on: self-hosted
of the workflow files