04-19 周五 GitHub actions-runner 程序解释

04-19 周五 GitHub actions-runner 程序解释
时间版本修改人描述
2024年4月19日17:26:17V0.1宋全恒新建文档

简介

 本文主要描述了actions-runner-linux-x64-2.315.0.tar.gz这个github actions CI所需要的客户端安装包的重要文件和内容信息。有关GitHub actions 的配置,使用,还可以参考如下相关的文件:

actions-runner

关于仓库

actions-runner托管于GitHub,其主要功能是:

The runner is the application that runs a job from a GitHub Actions workflow. It is used by GitHub Actions in the hosted virtual environments, or you can self-host the runner in your own environment.

img

 其主要支持的宿主机系统如下所示:

image-20240419173123224

下载地址。我们主要是关注Linux的。当前最新的版本是2.315.0

image-20240419173505013

注,上述图片中显示当前支持的系统架构和系统。并且actions-runner客户端平均三周左右会出新版本。客户端在与GitHub Server的过程中会自动下载最新版本和更新。

配置变化

 下图演示了在为客户端配置仓库之前和之后文件的变化。

image-20240419172834549

 可以看出,解压的actions-runner是不包含如组织下7个隐藏文件的,这些文件记录了config.sh执行产生的内容,这些信息具体如下图:

在这里插入图片描述

svc.sh

 用户最常用的大概是生成的svc.sh,因为可以通过这个命令查看该actions-runner的运行状态,并且管理其停止,卸载,安装。

yangfei@ubuntu:~/actions-ci$ sudo ./svc.sh status
[sudo] password for yangfei: 

/etc/systemd/system/actions.runner.CodexDive-LLMChat.42-application-runner.service
● actions.runner.CodexDive-LLMChat.42-application-runner.service - GitHub Actions Runner (CodexDive-LLMChat.42-application-runner)
     Loaded: loaded (/etc/systemd/system/actions.runner.CodexDive-LLMChat.42-application-runner.service; enabled; vendor preset: enabled)
     Active: active (running) since Thu 2024-04-18 08:57:47 UTC; 24h ago
   Main PID: 536962 (runsvc.sh)
      Tasks: 28 (limit: 629145)
     Memory: 161.0M
     CGroup: /system.slice/actions.runner.CodexDive-LLMChat.42-application-runner.service
             ├─536962 /bin/bash /home/yangfei/actions-ci/runsvc.sh
             ├─536965 ./externals/node16/bin/node ./bin/RunnerService.js
             └─536989 /home/yangfei/actions-ci/bin/Runner.Listener run --startuptype service

Apr 19 07:11:03 ubuntu runsvc.sh[536965]: 2024-04-19 07:11:03Z: Runner connect error: The HTTP request timed out after 00:01:00.. Retrying until reconnected.
Apr 19 07:12:14 ubuntu runsvc.sh[536965]: 2024-04-19 07:12:14Z: Runner reconnected.
Warning: journal has been rotated since unit was started, output may be incomplete.

注,svc.sh的执行,必须使用具有sudo权限的用户。

image-20240418152107536

目录作用解析

 下图阐述了actions-runner运行目录中各个目录的作用,具体如下所示

在这里插入图片描述

总结

 本文主要是描述actions-runner-linux-x64-2.315.0.tar.gz这个客户端安装程序在配置(即向仓库注册runner)的前后文件的变更,重要的内容以及文件的作用。

  • 10
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值