Composite actions for common Node.js and PHP steps. Keep workflows lean by reusing these blocks instead of duplicating setup logic across repos.
Warning
These are built for my personal projects and may not fit every setup without adjustment.
| Action | Path | What it does |
|---|---|---|
| GitHub Checkout | .github/actions/github-checkout |
Checkout repository at current ref. |
| CI Command | .github/actions/ci-command |
Run a provided CI command (matrix-friendly). |
| Node Setup | .github/actions/node-setup |
Set up Node with optional cache and version-file support. |
| Node Install | .github/actions/node-install |
Install Node dependencies (no checkout/setup). |
| Node Build | .github/actions/node-build |
Build Node projects (no checkout/setup). |
| Node Next Cache | .github/actions/node-next-cache |
Cache npm and .next/cache. |
| npm Publish | .github/actions/npm-publish |
Publish npm packages (workspace or root) with provenance. |
| PHP Setup | .github/actions/php-setup |
Set up PHP with extensions/tools. |
| PHP Composer Cache | .github/actions/php-composer-cache |
Cache Composer deps and vendor. |
| PHP Install Run | .github/actions/php-install-run |
Install PHP dependencies (no checkout/setup). |
| PHP Deploy | .github/actions/php-deploy |
Run Deployer-based deployments. |
- Create a workflow in your project (e.g.
.github/workflows/ci.yaml). - Use the action you need:
uses: krudi/reusable-actions/.github/actions/<action>@main.
Usage examples (with inputs) live alongside each action:
ci-commandgithub-checkoutnode-setupnode-installnode-buildnode-next-cachenpm-publishphp-setupphp-composer-cachephp-install-runphp-deploy
Node lint matrix
name: Lint
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
lint:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
lint-commands:
- 'npm run lint:eslint'
- 'npm run lint:stylelint'
steps:
- uses: krudi/reusable-actions/.github/actions/github-checkout@main
- uses: krudi/reusable-actions/.github/actions/node-setup@main
with:
cache: npm
node_version_file: .nvmrc
- uses: krudi/reusable-actions/.github/actions/node-install@main
- uses: krudi/reusable-actions/.github/actions/ci-command@main
with:
command: ${{ matrix.lint-commands }}