Skip to content

phpstan

phpstan #493

Workflow file for this run

name: GitHub CI PHPCS and PHPCBF
on:
pull_request:
types: [opened]
#on:
# push:
# paths:
# - '**.php'
jobs:
#filesChanged:
# uses: ./.github/workflows/files_changed.yaml
# with:
# folder_path: .*
linter_name:
name: Run & fix PHP Code Sniffer
runs-on: ubuntu-latest
#needs: filesChanged
steps:
- uses: actions/checkout@v3
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
# fetch-depth: 10
- name: echo Get list of all changed files
run: |
#echo ${{ needs.filesChanged.outputs.all_changed_files }}
#echo boolean_output=${{ needs.filesChanged.outputs.boolean_output }}
echo github.head_ref=${{github.head_ref}}
echo github.base_ref=${{github.base_ref}}
echo github.ref_name=${{github.ref_name}}
- uses: eldy/phpcsfixer-action@master
with:
github_token: ${{ secrets.github_token }}
use_default_configuration_file: false
phpcs_standard: 'dev/setup/codesniffer/ruleset.xml'
phpcs_head_ref: ${{github.head_ref}}
phpcs_base_ref: ${{github.base_ref}}
phpcs_ref_name: ${{github.ref_name}}
phpcs_github_event_name: ${{github.event_name}}
phpcs_files: ${{ needs.filesChanged.outputs.all_changed_files }}
#- uses: stefanzweifel/git-auto-commit-action@v4 # auto commit the fixes action for GitHub
# with:
# commit_message: Fix PHPCS errors by GitHub PHPCSfixer action
- name: Commit changes
uses: EndBug/add-and-commit@v9.1.3
with:
default_author: github_actions
committer_name: GitHub Actions
committer_email: actions@github.com
#author_name: PHP CS fixer
#author_email: eldy@destailleur.fr
#committer_name: PHP CS fixer
#committer_email: eldy@destailleur.fr
message: 'PHP CS fixer github action'
add: '*.php'