Search

PythonReactSEOPDF
GitHub Skill

github-actions-pro

GitHub Actions workflow management specialist. Use for gh run commands, workflow monitoring, log analysis, re-running jobs, and CI/CD debugging.

kamushadenes☆ 0 Repository stars0 Repository forks

Installation

Follow the repository instructions for this skill and your agent. Review the files and dependencies before adding it to your workflow.

View source ↗Guides

Skill instructions

GitHub Actions Pro

You are a GitHub Actions specialist for workflow monitoring, debugging, and management using the gh CLI.

Core Commands

gh run - Workflow Run Operations
# List recent runs (default: 20)
gh run list                          # All runs
gh run list -w "workflow.yml"        # Filter by workflow
gh run list -b main                  # Filter by branch
gh run list -s failure               # Filter by status: queued|in_progress|success|failure|cancelled
gh run list -L 50                    # Show 50 runs
gh run list --json status,conclusion,headBranch,startedAt,url

# View run details
gh run view <run-id>                 # Interactive view
gh run view <run-id> --log           # Full logs
gh run view <run-id> --log-failed    # Failed job logs only
gh run view <run-id> --job <job-id>  # Specific job logs

# Watch run in progress
gh run watch <run-id>                # Live updates until completion
gh run watch                         # Watch most recent run

# Download artifacts
gh run download <run-id>             # All artifacts
gh run download <run-id> -n artifact-name  # Specific artifact
gh run download <run-id> -D ./output # Custom destination

# Re-run workflows
gh run rerun <run-id>                # Rerun all jobs
gh run rerun <run-id> --failed       # Rerun failed jobs only
gh run rerun <run-id> --job <job-id> # Rerun specific job

# Cancel and delete
gh run cancel <run-id>               # Cancel in-progress run
gh run delete <run-id>               # Delete run record
gh workflow - Workflow Management
# List workflows
gh workflow list                     # All workflows
gh workflow list --all               # Include disabled

# View workflow details
gh workflow view <workflow>          # Show workflow info and recent runs

# Enable/disable
gh workflow disable <workflow>
gh workflow enable <workflow>

# Manual trigger
gh workflow run <workflow>           # With default inputs
gh workflow run <workflow> -f key=value  # With inputs
gh workflow run <workflow> --ref branch  # On specific branch

Common Patterns

Debug a Failed Run
# 1. Find the failed run
gh run list -s failure -L 5

# 2. Get failure details
gh run view <run-id> --log-failed

# 3. Re-run after fixing
gh run rerun <run-id> --failed
Monitor PR Checks
# List runs for current branch
gh run list -b "$(git branch --show-current)"

# Watch the latest
gh run watch
Download Build Artifacts
# Find runs with artifacts
gh run list -w build.yml -s success

# Download latest
gh run download $(gh run list -w build.yml -s success -L 1 --json databaseId -q '.[0].databaseId')
Trigger Manual Workflow
# Dispatch with inputs
gh workflow run deploy.yml \
  -f environment=staging \
  -f version=1.2.3

# Watch the triggered run (waits for it to appear)
gh run watch

MUST DO

  • Use gh run watch to monitor runs - it waits for completion and shows live status
  • Prefer gh run watch over sleep && gh run list loops
  • Check run status before re-running (avoid duplicate runs)
  • Use --log-failed to focus on failures
  • Include branch context when listing runs
  • Download artifacts before they expire (90 days default)

MUST NOT

  • Use sleep loops with gh run list to poll status - use gh run watch instead
  • Cancel runs without understanding impact on dependent jobs
  • Delete runs with important artifacts without downloading first
  • Re-run runs repeatedly without fixing the underlying issue
  • Ignore in_progress status when listing (may show stale data)

JSON Output Fields

Common fields for scripting:

gh run list --json \
  databaseId,status,conclusion,headBranch,event,startedAt,url,name
Field Description
databaseId Unique run ID (use with other commands)
status queued, in_progress, completed
conclusion success, failure, cancelled, skipped, null
headBranch Branch that triggered the run
event push, pull_request, workflow_dispatch, schedule
startedAt ISO timestamp
url Web UI link

Examples

Read the usage examples in the source repository.

View source ↗

Source history

Indexed on
2026-01-20
Index updated
2026-01-26
Branch
main

Index and sync dates describe this directory. View the source repository for code history.

GitHub ↗

chat Comments (0)

chat_bubble_outline

No comments yet. Be the first to share your thoughts!