-
-
Notifications
You must be signed in to change notification settings - Fork 2
42 lines (35 loc) · 1.01 KB
/
fix-code-style.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
name: Check & Fix Styling
on: [push]
jobs:
run:
runs-on: ubuntu-latest
name: Fix code style
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Cache dependencies
uses: actions/cache@v3
with:
path: ~/.composer/cache/files
key: dependencies-composer-${{ hashFiles('composer.json') }}
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
extensions: mbstring, intl
ini-values: post_max_size=256M, short_open_tag=On
coverage: none
tools: composer:v2
- name: Install dependencies
run: |
composer update --prefer-dist --no-interaction
- name: Fix style
if: ${{ always() }}
run: |
"${GITHUB_WORKSPACE}/vendor/bin/pint"
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Fix styling