闲社服务运行正常AI智能体自动化平台
g

GitHub Actions故障排查

技能标识:github-actions-troubleshooting

Troubleshoot GitHub Actions workflows, particularly for Go projects. Diagnose failing workflows, distinguish between code and environment issues, interpret logs, and apply fixes for common CI/CD problems.

作者:admin | 来源记录:ClawHub
登记来源
ClawHub
版本
V 1.0.0
检测标记
后台标记通过
免费
免费获取
1
收藏
来源与检测标记为平台登记信息,并不代表已展示可复核的检测报告。使用前请核对版本、依赖和所需权限,建议先在隔离环境中运行。
概述
安装方式
版本历史

GitHub Actions故障排查

GitHub Actions 故障排查技能

使用 gh 命令行工具和 Git 来诊断和修复 GitHub Actions 工作流故障,特别针对 Go 项目。本技能帮助识别故障是由代码问题还是环境/配置问题导致。

工作流分析

查看最近工作流运行的状态:

bash
gh run list --repo owner/repo --limit 10

查看特定失败工作流的详细信息:

bash
gh run view --repo owner/repo

仅获取失败任务的日志:

bash
gh run view --repo owner/repo --log-failed

区分问题类型

  1. 1. 代码问题:在不同环境中持续出现的编译、测试或代码检查失败
  2. 环境问题:在本地正常运行,但在 CI 中出现的依赖解析、工具安装或类型检查问题

常见 Go CI 修复方法

Linter 配置问题

  • - 查找表示导入解析问题的未定义引用错误
  • 尝试禁用类型检查 linter 的最小化配置
  • 使用 golangci-lint run --disable-all --enable=gofmt 进行基本语法检查

依赖解析

  • - 验证 go.mod 和 go.sum 的一致性
  • 运行 go mod tidy 解决依赖冲突
  • 检查所需依赖是否已正确声明

诊断命令

查看特定工作流任务日志:

bash
gh run view --job --repo owner/repo

下载工作流产物进行检查:

bash
gh run download --repo owner/repo

故障排查流程

  1. 1. 识别哪些任务失败、哪些任务通过
  2. 检查错误信息以获取问题性质的线索
  3. 确定问题是否可在本地复现
  4. 根据问题类型应用针对性修复
  5. 监控后续工作流运行以验证修复效果

标签

skill ai

通过对话安装

以下为平台配置的接入选项,并非逐项实测通过。能否安装取决于客户端支持、技能来源和运行环境:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 github-actions-troubleshooting-1776372170 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 github-actions-troubleshooting-1776372170 技能

通过命令行安装

skillhub install github-actions-troubleshooting-1776372170

下载

⬇ 下载 github-actions-troubleshooting v1.0.0(免费)

文件大小: 1.85 KB | 发布时间: 2026-4-17 14:41

v1.0.0 最新 2026-4-17 14:41
Initial release of the github-actions-troubleshooting skill:

- Provides commands and step-by-step guidance to troubleshoot GitHub Actions workflows, with a focus on Go projects.
- Helps distinguish between code-related and environment/configuration issues.
- Includes diagnostic commands for listing workflow runs, viewing logs, and downloading artifacts using the GitHub CLI.
- Offers common fixes for Go CI problems, such as linter configuration and dependency resolution.
- Details a structured workflow for analyzing and resolving CI/CD failures.
返回顶部