Skip to content

Composite actions for common Node.js CI steps. Keep workflows lean by reusing these blocks instead of duplicating setup logic across repos.

License

Notifications You must be signed in to change notification settings

krudi/reusable-actions

Repository files navigation

reusable-workflows

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.

Quick overview of actions

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.

Quick start

  1. Create a workflow in your project (e.g. .github/workflows/ci.yaml).
  2. Use the action you need: uses: krudi/reusable-actions/.github/actions/<action>@main.

Usage examples (with inputs) live alongside each action:

Real-world workflow examples

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 }}

About

Composite actions for common Node.js CI steps. Keep workflows lean by reusing these blocks instead of duplicating setup logic across repos.

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •