Skip to content

Commit 8401916

Browse files
committed
fix: check on main, fix on pull-request
1 parent acb7c3e commit 8401916

File tree

2 files changed

+43
-25
lines changed

2 files changed

+43
-25
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
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
5+
6+
on:
7+
push:
8+
paths:
9+
- '**.php'
10+
pull_request:
11+
paths:
12+
- '**.php'
13+
14+
permissions:
15+
contents: write
16+
17+
jobs:
18+
php-code-styling:
19+
runs-on: ubuntu-latest
20+
21+
steps:
22+
- name: Checkout code
23+
uses: actions/checkout@v4
24+
with:
25+
ref: ${{ github.head_ref }}
26+
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+
34+
- name: Fix PHP code style issues
35+
if: github.event_name == 'pull_request'
36+
uses: aglipanci/[email protected]
37+
38+
- name: Commit changes
39+
if: github.event_name == 'pull_request'
40+
uses: stefanzweifel/git-auto-commit-action@v5
41+
with:
42+
commit_message: Fix styling
43+

.github/workflows/linting.yml

-25
This file was deleted.

0 commit comments

Comments
 (0)