Skip to content

Commit ae36bfb

Browse files
committed
wip: simplify docker run ready for v2
1 parent 5e43612 commit ae36bfb

File tree

1 file changed

+6
-17
lines changed

1 file changed

+6
-17
lines changed

phpmd-action.bash

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -74,20 +74,9 @@ fi
7474

7575
echo "::debug::PHPMD Command: ${command_string[@]}"
7676

77-
if [ -z "$ACTION_PHPMD_PATH" ]
78-
then
79-
docker run --rm \
80-
--volume "${phar_path}":/usr/local/bin/phpmd \
81-
--volume "${GITHUB_WORKSPACE}":/app \
82-
--workdir /app \
83-
--network host \
84-
--env-file <( env| cut -f1 -d= ) \
85-
${docker_tag} "${command_string[@]}" && echo "PHPMD completed successfully"
86-
else
87-
docker run --rm \
88-
--volume "${GITHUB_WORKSPACE}":/app \
89-
--workdir /app \
90-
--network host \
91-
--env-file <( env| cut -f1 -d= ) \
92-
${docker_tag} "/app/${command_string[@]}" && echo "PHPMD completed successfully"
93-
fi
77+
docker run --rm \
78+
--volume "${GITHUB_WORKSPACE}":/app \
79+
--workdir /app \
80+
--network host \
81+
--env-file <( env| cut -f1 -d= ) \
82+
${docker_tag} "/app/${command_string[@]}" && echo "PHPMD completed successfully"

0 commit comments

Comments
 (0)