Merge pull request #756 from defunctl/master #308
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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" |