-
-
Notifications
You must be signed in to change notification settings - Fork 4
42 lines (33 loc) · 1.12 KB
/
code-style.yml
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
36
37
38
39
40
41
42
name: PHP-CS-Fixer
on:
push:
branches: [ master, main ]
pull_request:
branches: [ master, main ]
permissions:
contents: read
jobs:
code-style:
runs-on: ubuntu-latest
permissions:
contents: write # for Git to git apply
steps:
- uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
extensions: gd, intl, pdo_mysql
coverage: none # disable xdebug, pcov
# install dependencies from composer.json
- name: Install test dependencies
env:
COMPOSER: composer.json
run: composer install --prefer-dist --no-progress
# run php-cs-fixer, fix code styles
- name: Run PHP CS Fixer
run: composer cs-fix
# commit and push fixed files
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Apply php-cs-fixer changes