Skip to content

Commit da453c8

Browse files
authored
Setup PHP-CS-Fixer as a GHA workflow (#7)
1 parent c7e43cc commit da453c8

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

.github/workflows/fix-cs-php.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Update this by running
2+
# curl https://gist.githubusercontent.com/mpdude/ca93a185bcbf56eb7e341632ad4f8263/raw/fix-cs-php.yml > .github/workflows/fix-cs-php.yml
3+
4+
on:
5+
push:
6+
branches:
7+
- master
8+
pull_request:
9+
10+
name: Coding Standards
11+
12+
jobs:
13+
open-pr-for-cs-violations:
14+
name: PHP-CS-Fixer
15+
runs-on: ubuntu-20.04
16+
if: github.actor != 'dependabot[bot]'
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v2
20+
with:
21+
ref: ${{ github.head_ref }}
22+
23+
- name: Run PHP-CS-Fixer
24+
uses: docker://oskarstark/php-cs-fixer-ga:2.19.0
25+
26+
- name: Commit and push back changes
27+
uses: stefanzweifel/git-auto-commit-action@v4
28+
with:
29+
commit_message: "Fix CS with PHP-CS-Fixer 2.19.0"

0 commit comments

Comments
 (0)