act
Test GitHub Actions locally using act. Use when debugging workflows locally, testing workflow changes before pushing, or troubleshooting action failures.
от vinnie357★ 30 звёзд на 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.
Installation
Install via mise: mise install act (pinned in the github plugin's mise.toml), then verify with act --version. Homebrew, Linux script, source, and Chocolatey methods: see references/setup-and-config.md.
How act Works
act reads workflow files from .github/workflows/ and:
- Determines which actions and jobs to execute
- Pulls or builds required Docker images
- Creates containers matching GitHub's runner environment
- Executes steps in isolated containers
- Provides output matching GitHub Actions format
Key Concept: act uses Docker to simulate GitHub's runner environment locally.
Prerequisites
act requires a running Docker daemon (verify with docker ps) and valid .github/workflows/*.yml files. Details: see references/setup-and-config.md.
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 JSON and workflow_dispatch input payloads, passed with -e file.json: see references/setup-and-config.md. A worked PR-event example stays under Common Patterns below.
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 defaults, custom runner images, and image size trade-offs (medium catthehacker/ubuntu:act-latest recommended over micro): see references/setup-and-config.md.
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, --reuse, per-platform images, --container-architecture (needed on Apple silicon), networking (--network defaults to host; --container-daemon-socket is the Docker socket URI), and the artifact server: see references/setup-and-config.md.
Debugging
Verbose Output
# Verbose logging
act -v
# Very verbose (debug level)
act -vv
Watch Mode
# Watch for file changes and re-run
act --watch
Container Inspection
# List act containers
docker ps -a | grep act
# Inspect specific container
docker inspect <container-id>
# View logs
docker logs <container-id>
Limitations and Differences
Not Supported by act
- Some GitHub-hosted runner features
- GitHub Apps and installations
- OIDC token generation
- Some GitHub API interactions
- Certain cache implementations
- Job summaries and annotations (limited)
Workarounds
Missing tools:
steps:
- name: Install missing tool
run: |
if ! command -v tool &> /dev/null; then
apt-get update && apt-get install -y tool
fi
GitHub API calls:
# Use GITHUB_TOKEN from secrets
- env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh api repos/${{ github.repository }}/issues
Common Patterns
Testing Pull Request Workflow
# Create PR event payload
cat > pr-event.json << EOF
{
"pull_request": {
"number": 1,
"head": { "ref": "feature" },
"base": { "ref": "main" }
}
}
EOF
# Run PR workflow
act pull_request -e pr-event.json -j test
CI/CD Pipeline Testing
# Test entire CI pipeline
act push
# Test specific stages
act push -j build
act push -j test
act push -j deploy --secret-file .secrets
Matrix Testing
# Run matrix strategy locally
act -j test
# Test specific matrix combination (modify workflow temporarily)
act -j test --matrix node-version:24
Workf
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- references/setup-and-config.md
- scripts/install-act.nu
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 запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…