- openspec #169
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Fix PHP code style issues | |
| on: | |
| push: | |
| # Her commit'te çalışır (sadece PR branch'lerinde otomatik düzeltme yapar) | |
| pull_request: | |
| # Her PR'da çalışır | |
| permissions: | |
| contents: write | |
| jobs: | |
| php-code-styling-check: | |
| name: Check PHP code style (push) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| if: github.event_name == 'push' | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: 8.3 | |
| coverage: none | |
| - name: Install dependencies | |
| run: | | |
| composer require "laravel/framework:^11.0" --no-interaction --no-update | |
| composer update --prefer-stable --prefer-dist --no-interaction | |
| - name: Check Pint | |
| run: ./vendor/bin/pint --test | |
| php-code-styling-fix: | |
| name: Fix PHP code style (PR) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| if: github.event_name == 'pull_request' | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.head_ref }} | |
| - name: Fix PHP code style issues | |
| uses: aglipanci/laravel-pint-action@2.4 | |
| - name: Commit changes | |
| uses: stefanzweifel/git-auto-commit-action@v5 | |
| with: | |
| commit_message: Fix styling |