Skip to content

Commit 90d53a1

Browse files
committed
Add Pint style fixer workflow
1 parent 6d6249c commit 90d53a1

2 files changed

Lines changed: 45 additions & 0 deletions

File tree

.github/workflows/fix-style.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Fix Style
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: write
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: true
15+
16+
jobs:
17+
fix-style:
18+
name: Fix Style
19+
runs-on: ubuntu-latest
20+
timeout-minutes: 10
21+
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v6.0.3
25+
with:
26+
token: ${{ secrets.GITHUB_TOKEN }}
27+
28+
- name: Setup PHP
29+
uses: shivammathur/setup-php@v2
30+
with:
31+
php-version: '8.4'
32+
tools: composer:v2
33+
coverage: none
34+
35+
- name: Install dependencies
36+
run: composer install --prefer-dist --no-interaction --no-progress
37+
38+
- name: Run Pint
39+
run: ./vendor/bin/pint
40+
41+
- name: Commit style fixes
42+
uses: stefanzweifel/git-auto-commit-action@v6
43+
with:
44+
commit_message: Fix code style

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"symfony/process": "^7.0"
99
},
1010
"require-dev": {
11+
"laravel/pint": "^1.0",
1112
"pestphp/pest": "^3.0|^4.0"
1213
},
1314
"autoload": {

0 commit comments

Comments
 (0)