-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (37 loc) · 933 Bytes
/
lint.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Run Linter
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
lint:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
php: [8.4]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: json, dom, curl, libxml, mbstring
coverage: none
- name: Install Pint
run: composer install --dev
- name: Run Pint
run: composer run lint
if: github.event_name == 'pull_request'
- name: Run Pint
run: composer run lint:fix
if: github.event_name == 'push'
- name: Commit linted files
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Fix Linting
if: github.event_name == 'push'