File tree Expand file tree Collapse file tree 2 files changed +19
-3
lines changed
Expand file tree Collapse file tree 2 files changed +19
-3
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ description: Run your PHP Mess Detector tests in your Github Actions.
44inputs :
55 version :
66 description : What version of PHPMD to use
7- default : latest
7+ default : composer
88 required : false
99
1010 php_version :
7474 id : phpmd_run
7575 run : |
7676 set -e
77- bash <(curl -s https://raw.githubusercontent.com/php-actions/php-build/cee5b9fa9fbc4c888e7a62bbb7b8eade18e3c56b /php-build.bash) phpmd
77+ bash <(curl -s https://raw.githubusercontent.com/php-actions/php-build/59e915e4b8eeab830231a5dce6ad0998adebac05 /php-build.bash) phpmd
7878 ${{ github.action_path }}/phpmd-action.bash
7979 shell : bash
8080
Original file line number Diff line number Diff line change 33github_action_path=$( dirname " $0 " )
44docker_tag=$( cat ./docker_tag)
55
6+ echo " Docker tag: $docker_tag " >> output.log 2>&1
7+
8+ if [ " $ACTION_VERSION " = " composer" ]
9+ then
10+ VENDOR_BIN=" vendor/bin/phpmd"
11+ if test -f " $VENDOR_BIN "
12+ then
13+ ACTION_PHPMD_PATH=" $VENDOR_BIN "
14+ else
15+ echo " Trying to use version installed by Composer, but there is no file at $VENDOR_BIN "
16+ exit 1
17+ fi
18+ fi
19+
620if [ -z " $ACTION_PHPMD_PATH " ]
721then
822 phar_url=" https://www.getrelease.download/phpmd/phpmd/$ACTION_VERSION /phar"
7589echo " ::debug::PHPMD Command: ${command_string[@]} "
7690
7791docker run --rm \
92+ --volume " $phar_path " :/usr/local/bin/phpmd \
93+ --volume " ${GITHUB_WORKSPACE} /vendor/phpmd:/usr/local/phpmd" \
7894 --volume " ${GITHUB_WORKSPACE} " :/app \
7995 --workdir /app \
8096 --network host \
8197 --env-file <( env| cut -f1 -d= ) \
82- ${docker_tag} " /app/ ${command_string[@]} " && echo " PHPMD completed successfully "
98+ ${docker_tag} " ${command_string[@]} "
You can’t perform that action at this time.
0 commit comments