Reusable GitHub Actions workflows for my Laravel + Vite apps and PHP packages. Define CI once here, call it from every repo with a version tag — no copy-pasted YAML drifting across projects.
This is the authoritative, enforced quality gate (it can't be skipped like a local
--no-verify). Pair it with branch protection that requires the CI check to pass before merge.
Composer install → key:generate → Vite build → php artisan test.
| Input | Default | Description |
|---|---|---|
php-version |
8.3 |
PHP version. |
node-version |
20 |
Node version for the asset build. |
build |
true |
Run npm ci + npm run build. |
run-tests |
true |
Run php artisan test. |
Assumes the project's
phpunit.xmluses an in-memory SQLite DB (the default in these projects). A suite that needs MySQL would require a service container — extend as needed.
Composer install → optional PHPStan → PHPUnit, across a PHP version matrix.
| Input | Default | Description |
|---|---|---|
php-versions |
["8.3"] |
JSON array of PHP versions (matrix). |
phpstan |
false |
Run vendor/bin/phpstan analyse. |
test-command |
vendor/bin/phpunit |
Test command. |
Add a tiny caller workflow to the consuming repo.
Laravel app — .github/workflows/ci.yml:
name: CI
on: [push, pull_request]
jobs:
ci:
uses: givanov95/ci-workflows/.github/workflows/laravel-app.yml@v1PHP package — .github/workflows/ci.yml:
name: CI
on: [push, pull_request]
jobs:
ci:
uses: givanov95/ci-workflows/.github/workflows/php-package.yml@v1
with:
php-versions: '["8.3", "8.4"]'
phpstan: trueReference a major tag and it tracks the latest compatible release:
@v1— moving major tag (recommended for convenience).@v1.2.3— exact release (more reproducible).@<sha>— pinned commit (most secure).
When this repo is public, any repo can call its workflows. If you ever make it private, enable Settings → Actions → Access on this repo to allow your other repos to use it.
| Type | Workflow | Examples |
|---|---|---|
| Laravel app | laravel-app.yml |
gwebsolutions, slavelia, task, laravel-shop, laravel-starter* |
| PHP package | php-package.yml |
laravel-translations, laravel-attachments, laravel-data-table, typed-http, laravel-git-hooks |
MIT © Georgi Ivanov