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