-
-
Notifications
You must be signed in to change notification settings - Fork 85
45 lines (42 loc) · 1.21 KB
/
phpcbf.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
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow
name: "PHPCBF automatically fix violations"
on: # yamllint disable-line rule:truthy
pull_request:
paths:
- 'src/**'
- 'includes/**'
- '.github/workflows/phpcbf.yml'
push:
paths:
- 'src/**'
- 'includes/**'
- '.github/workflows/phpcbf.yml'
branches:
- master
jobs:
php-codesniffer:
name: "PHPCBF automatically fix violations"
runs-on: "ubuntu-22.04"
permissions:
contents: write
steps:
- name: "Set up PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: "8.0"
coverage: "none"
- name: "Checkout repository"
uses: "actions/checkout@v3"
- name: "Validate Composer configuration"
run: "composer validate --no-interaction --strict"
- name: "Install dependencies"
uses: "ramsey/composer-install@v2"
with:
dependency-versions: "highest"
- name: "Run PHPCBF"
continue-on-error: true
run: "composer run cs-fix"
- name: Commit PHPCBF changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "🤖 PHPCBF"