File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88 " vendor"
99 ],
1010 "files" : [
11+ " stubs/.github/workflows/ringier-code-style.yml" ,
1112 " .php-cs-fixer.php" ,
1213 " .phpcs.xml" ,
1314 " .styleci.yml" ,
Load diff This file was deleted.
Original file line number Diff line number Diff line change 1+ name : ringier-code-style
2+
3+ on :
4+ pull_request :
5+
6+ jobs :
7+ ringier-code-style :
8+ runs-on : ubuntu-latest
9+
10+ permissions :
11+ # Give the default GITHUB_TOKEN write permission to commit and push the changed files back to the repository.
12+ contents : write
13+
14+ steps :
15+ - uses : actions/checkout@v3
16+ with :
17+ ref : ${{ github.head_ref }}
18+
19+ - name : Setup PHP
20+ uses : shivammathur/setup-php@v2
21+ with :
22+ php-version : 8.1
23+ tools : composer:v2
24+
25+ - name : Get Composer Cache Directory
26+ id : composer-cache
27+ run : |
28+ echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
29+
30+ - name : Install dependencies
31+ run : composer global require ringierimu/ringier-code-style
32+
33+ - name : Setup config files
34+ run : ringier-code-style config:dump --all --quiet
35+
36+ - name : Get changed php files
37+ id : changed-files
38+ uses : tj-actions/changed-files@v35
39+ with :
40+ files : |
41+ **/*.php
42+
43+ - name : Run step if any php file(s) changed
44+ if : steps.changed-files.outputs.any_changed == 'true'
45+ run : |
46+ for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
47+ ringier-code-style fix "$file"
48+ done
49+
50+ - uses : stefanzweifel/git-auto-commit-action@v4
51+ with :
52+ commit_message : Apply ringier-code-style changes
You can’t perform that action at this time.
0 commit comments