Skip to content

Commit

Permalink
Create PHP-CS-Fixer.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
skerbis authored Aug 31, 2024
1 parent 2fa3c7d commit f17369c
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/PHP-CS-Fixer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: PHP-CS-Fixer

on:
push:
branches: [ master, main ]
pull_request:
branches: [ master, main ]

permissions:
contents: read

jobs:
code-style:
if: github.event.pull_request.draft == false

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.3'
extensions: gd, intl, pdo_mysql
coverage: none # disable xdebug, pcov

- name: Install Composer Dependencies
run: composer install --prefer-dist --no-progress

- name: Run PHP CS Fixer
run: vendor/bin/php-cs-fixer fix . --diff --verbose

- name: Commit and push fixed files
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Apply php-cs-fixer changes

0 comments on commit f17369c

Please sign in to comment.