generated from yiisoft/package-template
-
-
Notifications
You must be signed in to change notification settings - Fork 5
48 lines (41 loc) · 1.13 KB
/
cs.yml
File metadata and controls
48 lines (41 loc) · 1.13 KB
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
43
44
45
46
47
48
name: cs fixer
on:
pull_request_target:
paths-ignore:
- 'docs/**'
- 'README.md'
- 'CHANGELOG.md'
- '.gitignore'
- '.gitattributes'
- 'infection.json.dist'
- 'psalm.xml'
jobs:
fix:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
token: ${{ secrets.YIISOFT_GITHUB_TOKEN }}
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.5
tools: composer:v2
coverage: none
- name: Install Composer dependencies
uses: "ramsey/composer-install@v3"
- name: Run Rector
run: composer rector
- name: Run PHP CS Fixer
run: composer php-cs-fixer
- 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