Command Palette

Search for a command to run...

Назад к скиллам
скилл № 31934

github-actions

Use when the user asks for a GitHub Actions workflow to test and deploy on push, reusable workflows, composite actions, matrix builds, GITHUB_TOKEN…

БесплатноБез исполняемых скриптов
j4flmaoот j4flmao★ 47 звёзд на GitHub

Установить github-actions в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

GitHub Actions

Purpose

Define CI/CD pipelines using GitHub Actions workflows, reusable workflows, and composite actions.

Agent Protocol

Trigger

Exact user phrases: "GitHub Actions", "CI/CD", "workflow", "reusable workflow", "composite action", "matrix build", "actions/checkout", "GITHUB_TOKEN", "self-hosted runner".

Input Context

  • Language/framework (for setup action selection).
  • Test/build toolchain (for step configuration).
  • Deployment target (for deploy job design).
  • Whether reusable workflows or composite actions are needed.

Output Artifact

Writes to .github/workflows/.yml, action.yml, and/or .github/actions//action.yml.

Response Format

YAML workflow file with no extraneous explanation.

No preamble. No postamble. No explanations. No filler/hedging/transitions.

Completion Criteria

  • Workflow file(s) exist in .github/workflows/.
  • Matrix strategy configured for multi-version or multi-OS testing.
  • Caching configured for dependencies and build output.
  • Artifacts uploaded for build outputs.
  • Secrets referenced via secrets.X -- never hardcoded.

Architecture / Decision Trees

Workflow Structure Decision Tree

Complexity Approach Best For
Simple, single job Single workflow file Small projects, one build
Multi-job with dependencies Stages with needs Medium projects, build-test-deploy
Shared across repos Reusable workflows Org-wide CI standardization
Custom step logic Composite actions Encapsulated multi-step setup
Complex matrix Strategy matrix + include/exclude Multi-version, multi-OS testing
Monorepo Path filters + matrix Multi-package monorepo

Runner Selection

Runner Type Maintenance Network Security Cost
GitHub-hosted None Public internet Ephemeral, isolated Included in plan
Self-hosted (Linux) Team manages Corporate network Persistent, needs hardening Free (no GH billing)
Self-hosted (Windows) Team manages Corporate network Persistent, needs hardening Free (no GH billing)
Auto-scaling self-hosted Complex setup Corporate network Ephemeral options Free + infra cost
Larger runners None Public internet Ephemeral Pay per minute

Trigger Event Decision Tree

Trigger Typical Use Notes
push (branches) CI on merge to main Build + test + deploy
pull_request CI on PR Build + test only
workflow_dispatch Manual trigger Deploy, maintenance, custom
schedule (cron) Nightly builds Security scan, dependency update
release Package publishing Create release artifacts
workflow_call Reusable workflow Called by other workflows
repository_dispatch External trigger Webhook from external systems

Core Workflow

Step 1: Basic CI Workflow

name: CI
on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

env:
  NODE_VERSION: "22"

jobs:
  lint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: ${{ env.NODE_VERSION }}
          cache: "npm"
      - run: npm ci
      - run: npm run lint

  test:
    needs: lint
    runs-on: ubuntu-latest
    strategy:
      matrix:
        node-version: [18, 20, 22]
        os: [ubuntu-latest, windows-latest]
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: ${{ matrix.node-version }}
          cache: "npm"
      - run: npm ci
      - run: npm test
      - uses: actions/upload-artifact@v4
        if: failure()
        with:
          name: test-results-${{ matrix.os }}-${{ matrix.node-version }}
          path: test-results/

  build:
    needs: test
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: ${{ env.NODE_VERSION }}
          cache: "npm"
      - run: npm ci
      - run: npm run build
      - uses: actions/upload-artifact@v4
        with:
          name: build-output
          path: dist/

Step 2: Reusable Workflow

# .github/workflows/reusable-test.yml
name: Reusable Test Workflow
on:
  workflow_call:
    inputs:
      node-version:
        required: true
        type: string
        description: "Node.js version to use"
      build-command:
        required: false
        type: string
        default: "npm run build"
        description: "Build command"
    secrets:
      NPM_TOKEN:
        required: true

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: ${{ inputs.node-version }}
          registry-url: "https://npm.pkg.github.com"
      - run: npm ci
        env:
          NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
      - run: ${{ inputs.build-command }}
      - run: npm test

Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

  • references/best-practices.md
  • references/composite-actions.md
  • references/custom-actions.md
  • references/github-actions-advanced.md
  • references/github-actions-fundamentals.md
  • references/merged-github-actions-pipelines.md
  • references/reusable-workflows.md
  • references/workflow-basics.md
  • references/workflow-optimization.md

FAQ

Что делает скилл github-actions?

Use when the user asks for a GitHub Actions workflow to test and deploy on push, reusable workflows, composite actions, matrix builds, GITHUB_TOKEN permissions, OIDC to a cloud, self-hosted runners, or caching. Produces secure workflow YAML with pinned actions. Not for vendor-neutral pipeline design (use cicd-pipeline) or GitLab CI (use devops-gitlab-ci).

Как установить скилл github-actions?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл github-actions запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить github-actions с