File tree Expand file tree Collapse file tree 1 file changed +5
-10
lines changed
Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change 1+ name : PHP-CS-Fixer
2+
13on :
24 push :
35 branches :
46 - release-3.0
57 pull_request :
68
7- name : PHP Check
89jobs :
910 php-cs-fixer :
1011 name : PHP-CS-Fixer
@@ -14,18 +15,12 @@ jobs:
1415
1516 - name : Get changed files
1617 id : changed-files
17- run : |
18- if ${{ github.event_name == 'pull_request' }}; then
19- echo "all_changed_files_count=$(git diff HEAD --name-only | xargs | grep '\.php$')" >> $GITHUB_OUTPUT
20- else
21- echo "all_changed_files_count=$(git diff ${{ github.event.before }}...${{ github.event.after }} --name-only | xargs | grep '\.php$')" >> $GITHUB_OUTPUT
22- fi
18+ uses : tj-actions/changed-files@v38
2319
2420 - name : Get extra arguments for PHP-CS-Fixer
2521 id : phpcs-intersection
2622 run : |
27- CHANGED_FILES=$(echo "${{ steps.changed-files.outputs.all_changed_files_count }}" | tr ' ' '\n')
28- if echo "${CHANGED_FILES}" eq "1"; then CHANGED_FILES=""; fi
23+ CHANGED_FILES=$(echo "${{ steps.changed-files.outputs.all_changed_files }}" | tr ' ' '\n')
2924 if ! echo "${CHANGED_FILES}" | grep -qE "^(\\.php-cs-fixer(\\.dist)?\\.php|composer\\.lock)$"; then EXTRA_ARGS=$(printf -- '--path-mode=intersection\n--\n%s' "${CHANGED_FILES}"); else EXTRA_ARGS=''; fi
3025 echo "PHPCS_EXTRA_ARGS<<EOF" >> $GITHUB_ENV
3126 echo "$EXTRA_ARGS" >> $GITHUB_ENV
3429 - name : PHP-CS-Fixer
3530 uses : docker://oskarstark/php-cs-fixer-ga
3631 with :
37- args : --config=.php-cs-fixer.dist.php -v --dry-run --stop-on-violation --using-cache=no --allow-risky=yes ${{ env.PHPCS_EXTRA_ARGS }}
32+ args : --config=.php-cs-fixer.dist.php -v --dry-run --stop-on-violation --using-cache=no --quiet -- allow-risky=yes ${{ env.PHPCS_EXTRA_ARGS }}
You can’t perform that action at this time.
0 commit comments