Skip to content

fix: linting workflow #173

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 23, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion .github/workflows/fix-php-code-style-issues.yml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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

Loading