This commit is contained in:
Laurent Destailleur 2023-06-30 13:02:22 +02:00
parent 1a73f2f1d6
commit 877fb73a87
2 changed files with 4 additions and 0 deletions

View file

@ -46,6 +46,8 @@ jobs:
if: github.event_name=='pull_request'
id: files_changed_on_pr
run: |
echo github.head_ref=${{github.head_ref}}
echo github.base_ref=${{github.base_ref}}
git symbolic-ref refs/remotes/origin/HEAD origin/${{github.base_ref}}
all_changed_files=$(git --no-pager diff --name-only origin/${{github.head_ref}} origin/${{github.base_ref}})
echo "::set-output name=all_changed_files::$all_changed_files"

View file

@ -26,6 +26,7 @@ jobs:
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 }}
@ -33,6 +34,7 @@ jobs:
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_files: ${{ needs.filesChanged.outputs.all_changed_files }}
phpcs_args: '-n -s --extensions=php --colors --tab-width=4 --encoding=utf-8 --runtime-set ignore_warnings_on_exit true .'
#- uses: stefanzweifel/git-auto-commit-action@v4 # auto commit the fixes action for GitHub