Skip to content

Commit cea2b0d

Browse files
authored
fix: linting workflow (#499)
1 parent a2183f2 commit cea2b0d

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

.github/workflows/fix-php-code-style-issues.yml

+17-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
1-
name: Fix PHP code style issues
1+
# Check and fix PHP code style issues
2+
# Pull request: automatically fix PHP code style issues
3+
# Main branch: only check PHP code style issues since we don't have write permission
4+
name: Check and fix PHP code style issues
25

36
on:
47
push:
58
paths:
69
- '**.php'
10+
pull_request:
11+
paths:
12+
- '**.php'
713

814
permissions:
915
contents: write
@@ -18,10 +24,20 @@ jobs:
1824
with:
1925
ref: ${{ github.head_ref }}
2026

27+
- name: Check PHP code style issues
28+
if: github.event_name == 'push'
29+
uses: aglipanci/[email protected]
30+
with:
31+
verboseMode: true
32+
testMode: true
33+
2134
- name: Fix PHP code style issues
35+
if: github.event_name == 'pull_request'
2236
uses: aglipanci/[email protected]
2337

2438
- name: Commit changes
39+
if: github.event_name == 'pull_request'
2540
uses: stefanzweifel/git-auto-commit-action@v5
2641
with:
2742
commit_message: Fix styling
43+

0 commit comments

Comments
 (0)