环境准备
[root@liqiang.io]# yum install perl-Digest-SHA -y
安装
[liqiang@liqiang.io]# mkdir actions-runner && cd actions-runner
[liqiang@liqiang.io]# curl -o actions-runner-linux-x64-2.312.0.tar.gz -L https://github.com/actions/runner/releases/download/v2.312.0/actions-runner-linux-x64-2.312.0.tar.gz
[liqiang@liqiang.io]# echo "85c1bbd104d539f666a89edef70a18db2596df374a1b51670f2af1578ecbe031 actions-runner-linux-x64-2.312.0.tar.gz" | shasum -a 256 -c
[liqiang@liqiang.io]# tar xzf ./actions-runner-linux-x64-2.312.0.tar.gz
[liqiang@liqiang.io]# ./config.sh --url https://github.com/liuliqiang/laumonkey --token <token>
[liqiang@liqiang.io]# sudo ./svc install
启动 runner
[liqiang@liqiang.io]# sudo chcon system_u:object_r:usr_t:s0 runsvc.sh
[liqiang@liqiang.io]# sudo ./svc.sh start
图 :这个是图片说明 |
---|
查看 runner 状态
- 打开你的 repo,然后选择 settings
图 :这个是图片说明 |
---|
- 查看你的 runner 状态
图 :这个是图片说明 |
---|
这个状态可能是:
- Idle: The runner is connected to GitHub and is ready to execute jobs.
- Active: The runner is currently executing a job.
- Offline: The runner is not connected to GitHub. This could be because the machine is offline, the self-hosted runner application is not running on the machine, or the self-hosted runner application cannot communicate with GitHub.
- 使用自建 runner
直接在 action 的配置文件中,指定 runs-on: self-hosted
就可以让自建的 action 来运行你的 Github Action 了。
图 :这个是图片说明 |
---|