Skip to content

Add reusable phplinter-workflow #4

Add reusable phplinter-workflow

Add reusable phplinter-workflow #4

Workflow file for this run

---
name: 'PHPLint'
description: 'Run PHP linter'
on: workflow_call
inputs:
php-version:
description: 'The PHP-version to use for linting'
required: true
repository:
description: 'The repository that needs linting'
required: true
ref:
description: 'The branch, tag or SHA that needs linting'
required: false
default: 'master'
runs:
using: 'composite'
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0
repository: ${{ inputs.repository }}
ref: ${{ inputs.ref }}
- name: Setup PHP runtime
uses: shivammathur/setup-php@v2
with:
tools: phive
php-version: ${{ inputs.php-version }}
coverage: "none"
- name: Lint PHP files
run: |
phive install overtrue/phplint --force-accept-unsigned
phplint --no-cache --no-progress -v