12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- name: CS Fixer
- on:
- push:
- branches: [ "main", "develop" ]
- pull_request:
- branches: [ "main", "develop" ]
- permissions:
- contents: write
- jobs:
- cs-fixer:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v3
- - name: Validate composer.json and composer.lock
- run: composer validate --strict
- - name: Install dependencies
- run: composer install --prefer-dist --no-progress
- - name: Cache Composer packages
- id: composer-cache
- uses: actions/cache@v3
- with:
- path: vendor
- key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
- restore-keys: |
- ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
- - name: Run PHP CS Fixer
- uses: docker://oskarstark/php-cs-fixer-ga
- with:
- args: --config=.php-cs-fixer.dist.php --allow-risky=yes
- - name: Commit changes
- uses: stefanzweifel/git-auto-commit-action@v4
- with:
- commit_message: Fix styling
|