AGENT SKILL

github-workflow-automation

GitHub Actions workflow automation, CI/CD pipeline management, and monitoring using the GitHub CLI (gh).

License 许可
Apache-2.0
所属仓库
Clarit-AI/Plexium
最近更新
2026-11-02
Stars
★ 5
Forks
0

01 前言 Front Matter

name
github-workflow-automation
tags
[ "github", "github-actions", "ci-cd", "workflow-automation", "gh-cli" ]
version
2.0.0
category
github
description
GitHub Actions workflow automation, CI/CD pipeline management, and monitoring using the GitHub CLI (gh).

03 SKILL.md 正文

GitHub Workflow Automation Skill

Manage and monitor GitHub Actions workflows directly from the command line using the GitHub CLI (gh).

Quick Start

1. View and Run Workflows

# List all workflows in the repository
gh workflow list

# Run a specific workflow
gh workflow run "CI Pipeline" --ref main

# Run a workflow with inputs
gh workflow run deploy.yml -f environment=production -f debug=true

2. Monitor Workflow Runs

# List recent workflow runs
gh run list --limit 10

# Watch a run in progress (interactive)
gh run watch

# View logs for a specific run (or the last one)
gh run view --log

Core Capabilities

1. Analyzing Failures

Quickly find out why a CI job failed.

# Get the status of the latest run
gh run list --status failure --limit 1

# View the failed job logs
gh run view <run-id> --log-failed

2. Secret and Variable Management

# Set a repository secret for Actions
gh secret set API_TOKEN --body "your-token-here"

# Set an environment secret
gh secret set DB_PASSWORD --env production --body "secure-password"

# List variables
gh variable list

3. Creating New Workflows

When generating new workflows, adhere to these best practices:

  • Use actions/checkout@v4 and actions/setup-node@v4 (or current latest versions).
  • Define clear triggers (on: push, on: pull_request, on: workflow_dispatch).
  • Use concurrency groups to cancel redundant runs:
    concurrency:
      group: ${{ github.workflow }}-${{ github.ref }}
      cancel-in-progress: true
    

04 同仓库更多 Skills