-
-
Notifications
You must be signed in to change notification settings - Fork 10
38 lines (31 loc) · 962 Bytes
/
code-style.yml
File metadata and controls
38 lines (31 loc) · 962 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
36
37
38
name: Code Style
on: [ pull_request_target ]
jobs:
php-cs-fixer:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
ref: ${{ github.head_ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
tools: composer:v2
coverage: none
- name: Install Composer dependencies
uses: "ramsey/composer-install@v3"
- name: Run PHP CS Fixer
run: composer cs-fix
- name: Run Rector
run: ./vendor/bin/rector --output-format=github
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "Apply PHP CS Fixer and Rector changes (CI)"
file_pattern: '*.php'
disable_globbing: true