Skip to content

Commit 57f70b2

Browse files
author
Greg Bowler
committed
wip: add debug step
1 parent b8cbdd8 commit 57f70b2

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

php-build.bash

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,16 @@ echo "Building PHP $ACTION_PHP_VERSION with extensions: $ACTION_PHP_EXTENSIONS .
108108
# need to re-build, and the `docker build` step should use the cached layers of
109109
# what has just been pulled.
110110
echo "$dockerfile" > Dockerfile-php-build
111-
echo "Dockerfile:" >> output.log 2>&1
112-
echo "$dockerfile" >> output.log 2>&1
113-
docker build --tag "$docker_tag" --cache-from "$docker_tag" --file Dockerfile-php-build . >> output.log 2>&1
111+
if [ ACTIONS_RUNNER_DEBUG = "true" ]
112+
then
113+
echo "Dockerfile:"
114+
echo "$dockerfile"
115+
echo docker build --tag "$docker_tag" --cache-from "$docker_tag" --file Dockerfile-php-build .
116+
docker build --tag "$docker_tag" --cache-from "$docker_tag" --file Dockerfile-php-build .
117+
else
118+
docker build --tag "$docker_tag" --cache-from "$docker_tag" --file Dockerfile-php-build . >> output.log 2>&1
119+
fi
120+
114121
# Update the user's repository with the customised docker image, ready for the
115122
# next Github Actions run.
116123
if ! docker push "$docker_tag" >> output.log 2>&1; then

0 commit comments

Comments
 (0)