-
-
Notifications
You must be signed in to change notification settings - Fork 53
37 lines (30 loc) · 1.08 KB
/
php_cs_fixer.yaml
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
name: Format (PHP)
on:
pull_request:
branches:
- main
- 2.0
jobs:
php-cs-fixer:
runs-on: ubuntu-latest
# dont run jobs on forks, because we are not allowed to commit
# workaround for missing secret in fork PRs - see https://github.com/actions/checkout/issues/298
# see https://github.com/rectorphp/rector/commit/d395e1c28b8e6a56711dcc2e10490a82965850e4
if: github.event.pull_request.draft == false && github.repository == 'TYPO3/Surf' && github.actor != 'dependabot[bot]'
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.PHP_CS_FIXER }}
ref: ${{ github.head_ref }}
- uses: shivammathur/setup-php@v2
with:
php-version: 7.4
coverage: none # disable xdebug, pcov
- uses: "ramsey/composer-install@v2"
- name: Run php-cs-fixer
run: vendor/bin/php-cs-fixer fix --diff
- name: "Commit changed files"
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Apply php-cs-fixer changes
branch: ${{ github.head_ref }}