Create github actions

From dykyi-roman/awesome-claude-code · View interactive version

Create github actions is an AI agent skill from the GitHub repository dykyi-roman/awesome-claude-code. Generates GitHub Actions workflows for PHP projects. Creates CI/CD pipelines with PHPStan, PHPUnit, code coverage, Docker builds, and deployment stages.

How to use this skill

Skill file

GitHub Actions Workflow Generator

Generates optimized GitHub Actions workflows for PHP projects.

When to Use

Generated Files

.github/
└── workflows/
    ├── ci.yml           # Main CI pipeline
    ├── security.yml     # Security scanning
    └── deploy.yml       # Deployment workflow

Workflow Components

CI Pipeline (`ci.yml`)

4-stage pipeline with dependency caching and parallel execution:

| Stage | Jobs | Purpose |

|-------|------|---------|

| 1. Install | install | Composer install, upload vendor artifact |

| 2. Analysis | phpstan, psalm, cs-fixer, deptrac | Static analysis (parallel) |

| 3. Tests | test-unit, test-integration | PHPUnit with coverage upload |

| 4. Build | build | Docker image build and push (main/tags only) |

Key features:

Security Workflow (`security.yml`)

Triggers: push to main, PRs, weekly schedule (Monday).

| Job | Tool | Purpose |

|-----|------|---------|

| dependency-audit | composer audit | Known vulnerability check |

| psalm-security | Psalm taint analysis | Data flow security |

| trivy | Trivy + SARIF | Container image scanning |

Deploy Workflow (`deploy.yml`)

Triggers: version tags (v*), manual workflow_dispatch.

| Job | Condition | Environment |

|-----|-----------|-------------|

| deploy-staging | Push or manual staging | staging |

| deploy-production | Tags or manual production | 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

  1. Analyze project:
  1. Generate appropriate workflows:
  1. Customize based on:

File Placement

All workflows go in .github/workflows/:

| File | When Generated |

|------|---------------|

| ci.yml | Always |

| security.yml | When security tools detected or requested |

| deploy.yml | When deployment infrastructure detected |

Naming Conventions

Quick Template Reference

| Template | Lines | Key Actions Used |

|----------|-------|-----------------|

| CI Pipeline | ~270 | checkout@v4, setup-php@v2, cache@v4, upload-artifact@v4, codecov-action@v4, build-push-action@v5 |

| Security | ~70 | checkout@v4, setup-php@v2, trivy-action, upload-sarif |

| Deploy | ~70 | checkout@v4, environments, health checks |

| Matrix | ~30 | setup-php@v2, strategy matrix |

Usage

Provide:

The generator will:

  1. Analyze the project structure
  2. Generate optimized workflows
  3. Include caching and parallelization
  4. Add appropriate triggers and conditions

References

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.