Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

github-actions

БесплатноБез исполняемых скриптовНе проверен

GitHub Actions runs CI/CD pipelines defined as YAML workflows inside a GitHub repository. Use when someone asks to "set up CI", "add a GitHub Actions…

TerminalSkillsот TerminalSkills★ 221 звезда на GitHub14 установок в других каталогах

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

GitHub Actions

Overview

A workflow is a YAML file in .github/workflows/. It reacts to events (push, pull request, schedule, manual), runs one or more jobs on fresh runners, and each job runs steps: shell commands or reusable actions. This skill uses the action majors current in October 2026, all running on Node 24: actions/checkout@v7, actions/setup-node@v7, actions/cache@v6, actions/upload-artifact@v7, actions/download-artifact@v8, docker/login-action@v4, docker/setup-buildx-action@v4, docker/build-push-action@v7, actions/github-script@v9. Check a new action's latest major on its Releases page before copying a version from an old blog post.

Instructions

1. Minimal CI workflow

# .github/workflows/ci.yml
name: CI

on:
  push:
    branches: [main]
  pull_request:

permissions:
  contents: read            # least privilege; add scopes per job when needed

concurrency:
  group: ci-${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

jobs:
  test:
    runs-on: ubuntu-latest
    timeout-minutes: 15
    steps:
      - uses: actions/checkout@v7
      - uses: actions/setup-node@v7
        with:
          node-version: 24
          cache: npm              # caches ~/.npm keyed on package-lock.json
      - run: npm ci
      - run: npm test

Without a permissions block the GITHUB_TOKEN gets the repository default, which can be read-write. Declare it explicitly. Set timeout-minutes because a hung job otherwise runs for 6 hours.

2. Triggers

on:
  push:
    branches: [main, develop]
    paths: ['src/**', 'package.json']   # only when these files change
    tags: ['v*']
  pull_request:
    types: [opened, synchronize, reopened]
  schedule:
    - cron: '0 8 * * 1'                 # Mondays 08:00 UTC; runs only on the default branch
  workflow_dispatch:                    # manual run from the UI, gh CLI or API
    inputs:
      environment:
        description: Deploy target
        required: true
        type: choice
        options: [staging, production]
  workflow_call:                        # makes this file a reusable workflow

branches and paths together mean both must match. Add workflow_dispatch to any workflow you may need to start by hand. Run it with gh workflow run ci.yml -f environment=staging.

3. Caching and artifacts

setup-node, setup-python, setup-go and setup-java cache their package manager with a cache: input. For anything else use actions/cache:

- uses: actions/cache@v6
  with:
    path: .next/cache
    key: next-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
    restore-keys: next-${{ runner.os }}-

Cache entries are shared by branch scope (a PR can read the base branch's cache but not siblings') and are evicted after 7 days without access or when the repository exceeds its size limit. Use actions/cache/restore and actions/cache/save to split the two halves.

Artifacts move files between jobs or keep them after the run:

- uses: actions/upload-artifact@v7
  with:
    name: build-${{ github.sha }}
    path: dist/
    retention-days: 7
# in a later job with needs: build
- uses: actions/download-artifact@v8
  with:
    name: build-${{ github.sha }}
    path: dist/

Since artifact v4 an artifact name is unique per run: uploading the same name twice fails, so put the matrix key in the name (name: test-results-${{ matrix.os }}).

4. Matrix, outputs and job order

jobs:
  test:
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest, windows-latest]
        node-version: [22, 24]
    runs-on: ${{ matrix.os }}
    steps:
      - uses: actions/checkout@v7
      - uses: actions/setup-node@v7
        with: { node-version: "${{ matrix.node-version }}", cache: npm }
      - run: npm ci
      - run: npm test

  build:
    needs: test                 # runs only after every matrix leg passes
    runs-on: ubuntu-latest
    outputs:
      version: ${{ steps.ver.outputs.version }}
    steps:
      - uses: actions/checkout@v7
      - id: ver
        run: echo "version=$(jq -r .version package.json)" >> "$GITHUB_OUTPUT"

Jobs run in parallel unless needs links them. Read another job's output as ${{ needs.build.outputs.version }}. Steps write outputs to the $GITHUB_OUTPUT file; the old ::set-output command is removed.

5. Secrets, variables, environments

  deploy:
    needs: build
    if: github.ref == 'refs/heads/main'
    runs-on: ubuntu-latest
    environment: production        # required reviewers and environment secrets apply here
    steps:
      - run: ./deploy.sh
        env:
          DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }}
          API_URL: ${{ vars.API_URL }}

Create them under Settings, Secrets and variables, Actions, or with gh secret set DEPLOY_TOKEN. Pass secrets through env: and never splice ${{ }} of untrusted values (PR titles, branch names, issue bodies) into a run: script: that

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

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

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

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

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

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

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

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

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

_scores.json

FAQ

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

GitHub Actions runs CI/CD pipelines defined as YAML workflows inside a GitHub repository. Use when someone asks to "set up CI", "add a GitHub Actions workflow", "run tests on every pull request", "cache dependencies", "build a matrix", "deploy from Actions", "push a Docker image to ghcr.io" or "reuse a workflow", or needs triggers, secrets, environments, artifacts and permissions explained.

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

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

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

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

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

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