Awesome-claude-code create-github-actions
Generates GitHub Actions workflows for PHP projects. Creates CI/CD pipelines with PHPStan, PHPUnit, code coverage, Docker builds, and deployment stages.
install
source · Clone the upstream repo
git clone https://github.com/dykyi-roman/awesome-claude-code
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/dykyi-roman/awesome-claude-code "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/create-github-actions" ~/.claude/skills/dykyi-roman-awesome-claude-code-create-github-actions && rm -rf "$T"
manifest:
skills/create-github-actions/SKILL.mdsource content
GitHub Actions Workflow Generator
Generates optimized GitHub Actions workflows for PHP projects.
When to Use
- Setting up CI/CD for a new PHP project
- Adding static analysis, testing, or deployment pipelines
- Migrating from other CI systems to GitHub Actions
- Optimizing existing workflow performance
Generated Files
.github/ └── workflows/ ├── ci.yml # Main CI pipeline ├── security.yml # Security scanning └── deploy.yml # Deployment workflow
Workflow Components
CI Pipeline (ci.yml
)
ci.yml4-stage pipeline with dependency caching and parallel execution:
| Stage | Jobs | Purpose |
|---|---|---|
| 1. Install | | Composer install, upload vendor artifact |
| 2. Analysis | , , , | Static analysis (parallel) |
| 3. Tests | , | PHPUnit with coverage upload |
| 4. Build | | Docker image build and push (main/tags only) |
Key features:
- Concurrency control (cancel in-progress runs)
- Composer cache with
actions/cache@v4 - Vendor sharing via
actions/upload-artifact@v4 - Service containers for MySQL and Redis
- Coverage upload to Codecov
- Docker Buildx with GHCR push
Security Workflow (security.yml
)
security.ymlTriggers: push to main, PRs, weekly schedule (Monday).
| Job | Tool | Purpose |
|---|---|---|
| | Known vulnerability check |
| Psalm taint analysis | Data flow security |
| Trivy + SARIF | Container image scanning |
Deploy Workflow (deploy.yml
)
deploy.ymlTriggers: version tags (
v*), manual workflow_dispatch.
| Job | Condition | Environment |
|---|---|---|
| Push or manual staging | |
| Tags or manual production | |
Features: environment protection rules, health checks, sequential staging-then-production.
Matrix Testing
Cross-version testing pattern for libraries:
| Dimension | Values |
|---|---|
| PHP versions | 8.2, 8.3, 8.4 |
| Dependencies | lowest, highest |
| Coverage | Only on PHP 8.4 + highest |
Uses
fail-fast: false to run all combinations.
Generation Process
-
Analyze project:
- Check
for tools (phpstan, psalm, php-cs-fixer, deptrac)composer.json - Check existing
directory.github/workflows/ - Identify testing framework (PHPUnit, Pest)
- Check for Docker/docker-compose
- Check
-
Generate appropriate workflows:
- Basic CI if minimal tools detected
- Full CI if all tools present
- Security workflow if sensitive project
- Deploy workflow if infrastructure detected
-
Customize based on:
- PHP version from
composer.jsonrequire.php - Required services (MySQL, Redis, RabbitMQ)
- Coverage requirements and reporting
- Deployment targets and environments
- PHP version from
File Placement
All workflows go in
.github/workflows/:
| File | When Generated |
|---|---|
| Always |
| When security tools detected or requested |
| When deployment infrastructure detected |
Naming Conventions
- Workflow files: lowercase, hyphenated (e.g.,
,ci.yml
)security.yml - Job names: lowercase, hyphenated (e.g.,
,test-unit
)deploy-staging - Step names: sentence case (e.g.,
,Run PHPStan
)Upload coverage - Environment variables: UPPER_SNAKE_CASE (e.g.,
,PHP_VERSION
)COMPOSER_ARGS
Quick Template Reference
| Template | Lines | Key Actions Used |
|---|---|---|
| CI Pipeline | ~270 | , , , , , |
| Security | ~70 | , , , |
| Deploy | ~70 | , environments, health checks |
| Matrix | ~30 | , strategy matrix |
Usage
Provide:
- Project path or
composer.json - Required environments (staging, production)
- Custom requirements (specific services, notification channels)
The generator will:
- Analyze the project structure
- Generate optimized workflows
- Include caching and parallelization
- Add appropriate triggers and conditions
References
— Full YAML workflow templates (CI, Security, Deploy, Matrix)references/templates.md
— Concrete usage examples (minimal CI, multi-service, caching, artifacts, deployment)references/examples.md