actions

robbyt 的头像作者 robbyt

使用 GitHub CLI 进行 GitHub Actions 工作流程管理。当用户想要检查 CI 状态("检查 CI"、"构建是否通过")、查看工作流程运行("显示最近的运行"、"查看操作日志")、监视运行中的工作流程("监视 CI")或重新运行失败的工作流程("重新运行构建")时触发。

📖 中文导读:使用 GitHub CLI 进行 GitHub Actions 工作流程管理。当用户想要检查 CI 状态("检查 CI"、"构建是否通过")、查看工作流程运行("显示最近的运行"、"查看操作日志")、监视运行中的工作流程("监视 CI")或重新运行失败的工作流程("重新运行构建")时触发。 以下正文为该技能的原始 SKILL.md 内容(英文),上方安装命令可直接使用。

name: actions description: GitHub Actions workflow management using GitHub CLI. Trigger when user wants to check CI status ("check CI", "is the build passing"), view workflow runs ("show recent runs", "view action logs"), watch running workflows ("watch CI"), or rerun failed workflows ("rerun the build").

GitHub Actions

Monitor and manage GitHub Actions workflows with the gh CLI.

Prerequisites

GitHub CLI must be installed and authenticated:

gh auth status

Quick Reference

gh run list                         # List recent runs
gh run view 789                     # View run details
gh run view 789 --log               # View run logs
gh run watch 789                    # Watch running workflow
gh run rerun 789                    # Rerun workflow

List Workflow Runs

gh run list
gh run list --limit 10
gh run list --workflow ci.yml
gh run list --status failure
gh run list --branch main

View Run Details

gh run view 789
gh run view 789 --json status,conclusion,jobs

View Run Logs

gh run view 789 --log
gh run view 789 --log-failed  # Only failed job logs

Watch Running Workflow

gh run watch 789
gh run watch 789 --exit-status  # Exit with workflow status code

Rerun Workflows

gh run rerun 789
gh run rerun 789 --failed  # Rerun only failed jobs

List Workflows

gh workflow list
gh workflow view ci.yml