-
Notifications
You must be signed in to change notification settings - Fork 12
51 lines (45 loc) · 1.76 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
46
47
48
49
50
51
name: WordPress PHPCS Coding Standards Autofixer
on:
pull_request:
paths:
- '**.php'
jobs:
phpcbf-fixer:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
coverage: none
tools: cs2pr
# Install dependencies and handle caching in one go.
# @link https://github.com/marketplace/actions/install-composer-dependencies
- name: Install Composer dependencies
uses: "ramsey/composer-install@v1"
# Check the code-style consistency of the PHP files.
- name: Fix PHP code style
continue-on-error: true
run: ./vendor/squizlabs/php_codesniffer/bin/phpcbf -p -v --standard=${{ github.workspace }}/phpcs.xml --extensions=php ${{ github.workspace }}/
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.GH_BOT_TOKEN }}
commit-message: PHPCBF Auto Fix
committer: Linchpin Bot <dev@linchpin.com>
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
signoff: false
branch: ${{ github.event.pull_request.head.ref }}-phpcbf
delete-branch: true
title: 'Auto Fix Formatting'
body: |
Update Formatting
labels: |
phpcs
automated pr
milestone: 1
draft: false