File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 7070 php-version : " ${{ inputs.php-version }}"
7171 tools : composer:v2
7272
73+ # todo consider using cache
7374 - name : " Use the latest PHPCS version"
7475 run : composer require --dev squizlabs/php_codesniffer --prefer-dist --no-progress
7576 shell : bash
@@ -107,6 +108,15 @@ runs:
107108
108109 # restore composer.json before staging the changes
109110 git checkout composer.json
111+
112+ # Check for fixable changes
113+ if [ -z "$(git status --porcelain)" ]; then
114+ echo "::warning title=No fixable errors were found by phpcbf::Manual fix necessary. Compare to the PHP Code Sniffer section above."
115+ # Exiting gracefully
116+ exit 0
117+ # The rest of the script must still be within the same step to really stop the execution
118+ fi
119+
110120 git add .
111121
112122 # Determine branch name based on commit-changes input
You can’t perform that action at this time.
0 commit comments