Command Palette

Search for a command to run...

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

act

Test GitHub Actions locally using act. Use when debugging workflows locally, testing workflow changes before pushing, or troubleshooting action failures.

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

Установить act в Claude Code и Claude Desktop

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

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

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

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

act - Local GitHub Actions Testing

Activate when testing GitHub Actions workflows locally, debugging workflow issues, or developing actions without committing to remote repositories. This skill covers act installation, configuration, and usage patterns.

When to Use This Skill

Activate when:

  • Testing workflow changes before committing
  • Debugging workflow failures locally
  • Developing new workflows iteratively
  • Validating workflow syntax and logic
  • Testing actions with different events
  • Running workflows without GitHub runners
  • Troubleshooting act-specific issues

Installation

Using mise (Recommended for this project)

The act tool is configured in the github plugin's mise.toml:

# Install act via mise
mise install act

# Verify installation
act --version

Alternative Installation Methods

macOS (Homebrew):

brew install act

Linux (via script):

curl -s https://raw.githubusercontent.com/nektos/act/master/install.sh | sudo bash

From source:

git clone https://github.com/nektos/act.git
cd act
make install

Windows (Chocolatey):

choco install act-cli

How act Works

act reads workflow files from .github/workflows/ and:

  1. Determines which actions and jobs to execute
  2. Pulls or builds required Docker images
  3. Creates containers matching GitHub's runner environment
  4. Executes steps in isolated containers
  5. Provides output matching GitHub Actions format

Key Concept: act uses Docker to simulate GitHub's runner environment locally.

Prerequisites

  • Docker: act requires Docker to run workflows
  • Workflow files: Valid .github/workflows/*.yml files in repository

Verify Docker is running:

docker ps

Basic Usage

List Available Workflows

# List all workflows
act -l

# Output:
# Stage  Job ID  Job name  Workflow name  Workflow file  Events
# 0      build   build     CI             ci.yml         push,pull_request
# 0      test    test      CI             ci.yml         push,pull_request

Run Default Event (push)

# Run all jobs triggered by push event
act

# Run specific job
act -j build

# Run specific workflow
act -W .github/workflows/ci.yml

Run Specific Events

# Pull request event
act pull_request

# Manual workflow dispatch
act workflow_dispatch

# Push to specific branch
act push -e .github/workflows/push-event.json

# Schedule event
act schedule

Dry Run

# Show what would run without executing
act -n

# Show with full details
act -n -v

Event Payloads

Custom Event Data

Create event JSON file:

{
  "pull_request": {
    "number": 123,
    "head": {
      "ref": "feature-branch"
    },
    "base": {
      "ref": "main"
    }
  }
}

Use with act:

act pull_request -e event.json

workflow_dispatch Inputs

{
  "inputs": {
    "environment": "staging",
    "debug": true
  }
}
act workflow_dispatch -e inputs.json

Secrets Management

Via Command Line

# Single secret
act -s GITHUB_TOKEN=ghp_xxxxx

# Multiple secrets
act -s API_KEY=key123 -s DB_PASSWORD=pass456

Via .secrets File

Create .secrets file (add to .gitignore):

GITHUB_TOKEN=ghp_xxxxx
API_KEY=key123
DB_PASSWORD=pass456

Run with secrets file:

act --secret-file .secrets

Environment Variables

# Use existing env var
act -s GITHUB_TOKEN

# Set from command
export MY_SECRET=value
act -s MY_SECRET

Configuration

.actrc File

Create .actrc in repository root or home directory:

# Use specific platform
-P ubuntu-latest=catthehacker/ubuntu:act-latest

# Default secrets file
--secret-file .secrets

# Default environment
--env-file .env

# Container architecture
--container-architecture linux/amd64

# Verbose output
-v

Custom Runner Images

# Use custom image for platform
act -P ubuntu-latest=my-custom-image:latest

# Use medium size images (recommended)
act -P ubuntu-latest=catthehacker/ubuntu:act-latest

# Use micro images (faster, less compatible)
act -P ubuntu-latest=node:16-buster-slim

Recommended Images

act supports different image sizes:

Medium images (recommended):

  • Better compatibility with GitHub Actions
  • More pre-installed tools
  • Slower startup but fewer failures
-P ubuntu-latest=catthehacker/ubuntu:act-latest
-P ubuntu-22.04=catthehacker/ubuntu:act-22.04

Micro images:

  • Faster startup
  • Minimal pre-installed tools
  • May require additional setup

Environment Variables

Via .env File

Create .env file:

NODE_ENV=test
API_URL=http://localhost:3000
LOG_LEVEL=debug

Use with act:

act --env-file .env

Via Command Line

act --env NODE_ENV=test --env API_URL=http://localhost:3000

Advanced Usage

Bind Workspace

Mount local directory into container:

act --bind

Reuse Containers

Keep containers between r

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

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

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

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

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

  • metadata.json

FAQ

Что делает скилл act?

Test GitHub Actions locally using act. Use when debugging workflows locally, testing workflow changes before pushing, or troubleshooting action failures.

Как установить скилл act?

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

Скилл act запускает скрипты?

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

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

Сравнить act с