mirror of
https://gh.wpcy.net/https://github.com/presswizards/FreeScoutGPT.git
synced 2026-07-15 04:11:15 +08:00
43 lines
1 KiB
YAML
43 lines
1 KiB
YAML
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
|