Skip to content

Commit

Permalink
Fix php cs fixer
Browse files Browse the repository at this point in the history
  • Loading branch information
brendt committed Dec 9, 2021
1 parent a3cf20b commit 592399c
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 13 deletions.
32 changes: 19 additions & 13 deletions .github/workflows/php-cs-fixer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,27 @@ name: Check & fix styling
on: [push]

jobs:
php-cs-fixer:
style:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
- name: Checkout code
uses: actions/checkout@v2

- name: Run PHP CS Fixer
uses: docker://oskarstark/php-cs-fixer-ga
with:
args: --config=.php_cs.dist.php --allow-risky=yes
- name: Fix style
uses: docker://oskarstark/php-cs-fixer-ga
with:
args: --config=.php_cs.php --allow-risky=yes

- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Fix styling
- name: Extract branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch

- name: Commit changes
uses: stefanzweifel/[email protected]
with:
commit_message: Fix styling
branch: ${{ steps.extract_branch.outputs.branch }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ docs
phpunit.xml
psalm.xml
vendor
.php-cs-fixer.cache
File renamed without changes.

0 comments on commit 592399c

Please sign in to comment.