Meshtastic GitHub Action Runner 是专为Meshtastic项目设计的自托管GitHub Actions运行器镜像,基于Ubuntu LTS构建,预装Meshtastic开发全套依赖工具(Python、PlatformIO、meshtastic-cli等),用于自动化执行代码构建、固件编译、单元测试及部署等CI/CD任务,简化Meshtastic开发流程。
repo和admin:org权限(用于注册运行器)bashdocker run -d \ --name meshtastic-runner \ -e GITHUB_TOKEN="your_github_pat" \ -e RUNNER_REPOSITORY="meshtastic/Meshtastic-device" \ -e RUNNER_NAME="meshtastic-ci-01" \ -e RUNNER_LABELS="meshtastic,firmware-build,x86_64" \ meshtastic/action-runner:latest
| 环境变量名 | 必须 | 描述 | 示例值 |
|---|---|---|---|
GITHUB_TOKEN | 是 | GitHub PAT令牌,需包含repo权限(仓库级)或admin:org权限(组织级) | ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
RUNNER_REPOSITORY | 是 | 目标仓库(格式:owner/repo)或组织(格式:org:org_name) | meshtastic/Meshtastic-device |
RUNNER_NAME | 否 | 运行器名称,默认随机生成 | meshtastic-runner-01 |
RUNNER_LABELS | 否 | 运行器标签(逗号分隔),用于工作流runs-on匹配 | meshtastic,firmware,ubuntu-lts |
RUNNER_EPHEMERAL | 否 | 启用临时模式(任务结束自动注销),true/false,默认false | true |
RUNNER_WORKDIR | 否 | 工作目录路径,默认/_work | /meshtastic-workspace |
RUNNER_GROUP | 否 | 组织级运行器组名称,默认加入"Default"组 | meshtastic-ci-group |
yamlversion: '3.8' services: meshtastic-runner: image: meshtastic/action-runner:latest container_name: meshtastic-ci-runner restart: unless-stopped environment: - GITHUB_TOKEN=your_github_pat_here - RUNNER_REPOSITORY=meshtastic/Meshtastic-device - RUNNER_NAME=meshtastic-firmware-builder - RUNNER_LABELS=meshtastic,firmware-build,arm64 - RUNNER_EPHEMERAL=true volumes: - runner-workdir:/_work # 持久化工作目录,加速依赖缓存 devices: - /dev/ttyUSB0:/dev/ttyUSB0 # 映射USB串口(如需固件烧录) deploy: resources: limits: cpus: '4' memory: 8G volumes: runner-workdir:
验证运行状态:
bashdocker logs meshtastic-ci-runner
成功注册日志示例:√ Runner registered successfully
GitHub仓库验证: 进入仓库 → Settings → Actions → Runners,查看运行器状态应为"在线"(Online)
工作流触发示例:
在Meshtastic项目中创建.github/workflows/firmware-build.yml:
yamlname: Build Firmware on: [push] jobs: build: runs-on: [self-hosted, meshtastic, firmware-build] steps: - uses: actions/checkout@v4 - name: Build firmware run: pio run -e tbeam
bash# 停止运行器 docker stop meshtastic-ci-runner # 移除容器(临时模式下自动注销,非临时模式需手动注销) docker rm meshtastic-ci-runner # 清理工作目录(如需彻底重置) docker volume rm runner-workdir
GITHUB_TOKEN需限制最小权限,建议仅授予必要仓库的repo权限,避免使用组织级管理员令牌runs-on字段严格匹配(如[self-hosted, meshtastic])docker pull meshtastic/action-runner:latest)以获取依赖安全更新GITHUB_TOKEN来自真实用户的反馈,见证轩辕镜像的优质服务
免费版仅支持 Docker Hub 加速,不承诺可用性和速度;专业版支持更多镜像源,保证可用性和稳定速度,提供优先客服响应。
免费版仅支持 docker.io;专业版支持 docker.io、gcr.io、ghcr.io、registry.k8s.io、nvcr.io、quay.io、mcr.microsoft.com、docker.elastic.co 等。
当返回 402 Payment Required 错误时,表示流量已耗尽,需要充值流量包以恢复服务。
通常由 Docker 版本过低导致,需要升级到 20.x 或更高版本以支持 V2 协议。
先检查 Docker 版本,版本过低则升级;版本正常则验证镜像信息是否正确。
使用 docker tag 命令为镜像打上新标签,去掉域名前缀,使镜像名称更简洁。
探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式
通过 Docker 登录认证访问私有仓库
在 Linux 系统配置镜像加速服务
在 Docker Desktop 配置镜像加速
Docker Compose 项目配置加速
Kubernetes 集群配置 Containerd
在宝塔面板一键配置镜像加速
Synology 群晖 NAS 配置加速
飞牛 fnOS 系统配置镜像加速
极空间 NAS 系统配置加速服务
爱快 iKuai 路由系统配置加速
绿联 NAS 系统配置镜像加速
QNAP 威联通 NAS 配置加速
Podman 容器引擎配置加速
HPC 科学计算容器配置加速
ghcr、Quay、nvcr 等镜像仓库
无需登录使用专属域名加速
需要其他帮助?请查看我们的 常见问题 或 官方QQ群: 13763429