Skip to content

Commit 1b48769

Browse files
committed
Add reusable phplinter-workflow
1 parent 8a2c2c1 commit 1b48769

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/phplinter_84.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
3+
name: 'PHPLint'
4+
description: 'Run PHP linter'
5+
6+
inputs:
7+
php-version:
8+
description: 'The PHP-version to use for linting'
9+
required: true
10+
repository:
11+
description: 'The repository that needs linting'
12+
required: true
13+
ref:
14+
description: 'The branch, tag or SHA that needs linting'
15+
required: false
16+
default: 'master'
17+
18+
runs:
19+
using: 'composite'
20+
steps:
21+
- name: Checkout Code
22+
uses: actions/checkout@v4
23+
with:
24+
fetch-depth: 0
25+
repository: ${{ inputs.repository }}
26+
ref: ${{ inputs.ref }}
27+
28+
- name: Setup PHP runtime
29+
uses: shivammathur/setup-php@v2
30+
with:
31+
tools: phive
32+
php-version: ${{ inputs.php-version }}
33+
coverage: "none"
34+
35+
- name: Lint PHP files
36+
run: |
37+
phive install overtrue/phplint --force-accept-unsigned
38+
phplint --no-cache --no-progress -v

0 commit comments

Comments
 (0)