Skip to content

Instantly share code, notes, and snippets.

@mpdude
Created May 20, 2022 08:57
Show Gist options
  • Save mpdude/804005e2bc7717bc36e4def876a5303d to your computer and use it in GitHub Desktop.
Save mpdude/804005e2bc7717bc36e4def876a5303d to your computer and use it in GitHub Desktop.
Run PHP-CS-Fixer on PRs and commit/push back changes
# .github/workflows/fix-php-cs.yml
on:
pull_request:
name: Coding Standards
jobs:
open-pr-for-cs-violations:
name: PHP-CS-Fixer
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Run PHP-CS-Fixer
uses: docker://oskarstark/php-cs-fixer-ga
- name: Commit and push back changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "Fix Code Style with PHP-CS-Fixer"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment