-
Notifications
You must be signed in to change notification settings - Fork 1
36 lines (27 loc) · 996 Bytes
/
fix.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
name: Fix code style
on: push
jobs:
laravel-pint:
runs-on: ubuntu-latest
steps:
- uses: shivammathur/setup-php@15c43e89cdef867065b0213be354c2841860869e
with:
php-version: '8.2'
- uses: actions/checkout@v4
with:
# Fetch the last 2 commits instead of just 1. (Fetching just 1 commit would overwrite the whole history)
fetch-depth: 2
- name: Install Dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- name: Fix code style
run: composer fix
- name: Get last commit message
id: last-commit-message
run: |
echo "::set-output name=msg::$(git log -1 --pretty=%s)"
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: ${{ steps.last-commit-message.outputs.msg }}
commit_options: '--amend --no-edit'
push_options: '--force'
skip_fetch: true