-
Notifications
You must be signed in to change notification settings - Fork 13
35 lines (30 loc) · 943 Bytes
/
phpcs.yml
File metadata and controls
35 lines (30 loc) · 943 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: Fix styling
on:
pull_request:
branches:
- 'main'
- 'bug-fix'
jobs:
php-cs-fixer:
runs-on: ubuntu-latest
# Check if contains [ci skip] will be skip github action
if: "!contains(github.event.head_commit.message, '[ci skip]')"
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
- uses: actions/cache@v3
with:
path: .php-cs-fixer.cache
key: ${{ runner.OS }}-${{ github.repository }}-phpcsfixer-${{ github.sha }}
restore-keys: |
${{ runner.OS }}-${{ github.repository }}-phpcsfixer-
- name: Run PHP CS Fixer
uses: docker://oskarstark/php-cs-fixer-ga
with:
args: --config=.php-cs-fixer.php --allow-risky=yes
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "Fix styling"