From 0956e98a500f9f10f233626d249039560b884ab9 Mon Sep 17 00:00:00 2001 From: Eser DENIZ Date: Fri, 21 Feb 2025 21:06:12 +0100 Subject: [PATCH] fix: linting workflow --- .../workflows/fix-php-code-style-issues.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/fix-php-code-style-issues.yml b/.github/workflows/fix-php-code-style-issues.yml index 0edbd389..eb79b6e0 100644 --- a/.github/workflows/fix-php-code-style-issues.yml +++ b/.github/workflows/fix-php-code-style-issues.yml @@ -1,9 +1,15 @@ -name: Fix PHP code style issues +# Check and fix PHP code style issues +# Pull request: automatically fix PHP code style issues +# Main branch: only check PHP code style issues since we don't have write permission +name: Check and fix PHP code style issues on: push: paths: - '**.php' + pull_request: + paths: + - '**.php' permissions: contents: write @@ -18,10 +24,20 @@ jobs: with: ref: ${{ github.head_ref }} + - name: Check PHP code style issues + if: github.event_name == 'push' + uses: aglipanci/laravel-pint-action@2.5 + with: + verboseMode: true + testMode: true + - name: Fix PHP code style issues + if: github.event_name == 'pull_request' uses: aglipanci/laravel-pint-action@2.5 - name: Commit changes + if: github.event_name == 'pull_request' uses: stefanzweifel/git-auto-commit-action@v5 with: commit_message: Fix styling +