Skip to content

Commit 2c39682

Browse files
committed
#1930 add formatting to the coding-standards Github Workflow
1 parent 5cd38c6 commit 2c39682

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

.github/workflows/coding-standards.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ jobs:
1313
name: "phpcs"
1414
runs-on: "ubuntu-22.04"
1515

16+
permissions:
17+
# Give the default GITHUB_TOKEN write permission to commit and push the
18+
# added or changed files to the repository.
19+
contents: write
20+
1621
steps:
1722
- name: "Checkout"
1823
uses: "actions/checkout@v4"
@@ -52,6 +57,14 @@ jobs:
5257
- name: "Run PHP_CodeSniffer"
5358
run: "vendor/bin/phpcs -q --no-colors --report=checkstyle | cs2pr"
5459

60+
- name: "Format the code"
61+
run: ./vendor/bin/phpcbf
62+
63+
- name: "Commit the changes"
64+
uses: stefanzweifel/git-auto-commit-action@v5
65+
with:
66+
commit_message: "apply phpcbf formatting"
67+
5568
analysis:
5669
runs-on: "ubuntu-22.04"
5770
continue-on-error: true

0 commit comments

Comments
 (0)