@@ -4,14 +4,21 @@ github_action_path=$(dirname "$0")
4
4
docker_tag=$( cat ./docker_tag)
5
5
echo " Docker tag: $docker_tag " >> output.log 2>&1
6
6
7
- phar_url=" https://phar.phpunit.de/phpunit"
8
- if [ " $ACTION_VERSION " != " latest" ]
7
+ if [ -n " $ACTION_PHPUNIT_PATH " ]
9
8
then
10
- phar_url=" ${phar_url} -${ACTION_VERSION} "
9
+ phar_url=" https://phar.phpunit.de/phpunit"
10
+ if [ " $ACTION_VERSION " != " latest" ]
11
+ then
12
+ phar_url=" ${phar_url} -${ACTION_VERSION} "
13
+ fi
14
+ phar_url=" ${phar_url} .phar"
15
+ curl --silent -H " User-agent: cURL (https://github.com/php-actions)" -L " $phar_url " > " ${github_action_path} /phpunit.phar"
16
+ chmod +x " ${github_action_path} /phpunit.phar"
17
+
18
+ phar_path=" ${github_action_path} /phpunit.phar"
19
+ else
20
+ phar_path=" ${GITHUB_WORKSPACE} /$ACTION_PHPUNIT_PATH "
11
21
fi
12
- phar_url=" ${phar_url} .phar"
13
- curl --silent -H " User-agent: cURL (https://github.com/php-actions)" -L " $phar_url " > " ${github_action_path} /phpunit.phar"
14
- chmod +x " ${github_action_path} /phpunit.phar"
15
22
16
23
command_string=(" phpunit" )
17
24
85
92
command_string+=($ACTION_ARGS )
86
93
fi
87
94
95
+
88
96
echo " Command: " " ${command_string[@]} " >> output.log 2>&1
89
97
docker run --rm \
90
- --volume " ${github_action_path} /phpunit.phar " :/usr/local/bin/phpunit \
98
+ --volume " ${phar_path} " :/usr/local/bin/phpunit \
91
99
--volume " ${GITHUB_WORKSPACE} " :/app \
92
100
--workdir /app \
93
101
--network host \
0 commit comments