github self hosted runner

最後更新: 2023-09-15

目錄

  • Install runner
  • Install as Service

Install runner

 

# 安裝系統工具

apt-get install tar gzip bzip2 rsync -y

 * 千萬別安系統的 git, 否則會出 Error

# Create a folder

$ mkdir actions-runner && cd actions-runner # Download the latest runner package

$ curl -o actions-runner-linux-x64-2.309.0.tar.gz -L https://github.com/actions/runner/releases/download/v2.309.0/actions-run...

# Optional: Validate the hash

$ echo "2974243bab2a282349ac833475d241d5273605d3628f0685bd07fb5530f9bb1a  actions-runner-linux-x64-2.309.0.tar.gz" | shasum -a 256 -c

# Extract the installer

$ tar -zxf ./actions-runner-linux-x64-2.309.0.tar.gz

# Create the runner and start the configuration experience

$ ./config.sh --url https://github.com/{org here} --token {token here}

Notes:

# To remove your self-hosted runner from an organization

./config.sh remove --token TOKEN

# Last step, run it!

$ ./run.sh

 


Install as Service

 

svc.sh script that is created after successfully adding the runner to install and manage using the application as a service.

1. Stop the self-hosted runner application if it is currently running.

run cli by root

./svc.sh install USERNAME
./svc.sh start
./svc.sh status
./svc.sh stop
./svc.sh uninstall

 

 

Creative Commons license icon Creative Commons license icon