@@ -48,7 +48,7 @@ base_repo="$1"
48
48
49
49
# We log into the Github docker repository on behalf of the user that is
50
50
# running the action (this could be anyone, outside of the php-actions organisation).
51
- echo " ${ACTION_TOKEN} " | docker login docker.pkg.github.com -u " ${GITHUB_ACTOR} " --password-stdin
51
+ echo " ${ACTION_TOKEN} " | docker login docker.pkg.github.com -u " ${GITHUB_ACTOR} " --password-stdin >> output.log 2>&1
52
52
53
53
# If there are any extensions to be installed, we do this using the
54
54
# install-php-extensions tool. If there are not extensions required, we don't
@@ -87,22 +87,23 @@ echo "$docker_tag" > ./docker_tag
87
87
# Attempt to pull the existing Docker image, if it exists. If the image has
88
88
# been pushed previously, this image should take preference and a new image
89
89
# will not need to be built.
90
- echo " Pulling $docker_tag "
90
+ echo " Pulling $docker_tag " >> output.log 2>&1
91
91
92
92
# No need to continue building the image if the pull was successful.
93
93
if docker pull " $docker_tag " ;
94
94
then
95
95
exit
96
96
fi
97
97
98
+ echo " Building PHP $ACTION_PHP_VERSION with extensions: $ACTION_PHP_EXTENSIONS ..."
98
99
# Save the dockerfile to a physical file on disk, then build the image, tagging
99
100
# it with the unique tag. If the layers are already built, there should be no
100
101
# need to re-build, and the `docker build` step should use the cached layers of
101
102
# what has just been pulled.
102
103
echo " $dockerfile " > Dockerfile
103
- echo " Dockerfile:"
104
- echo " $dockerfile "
105
- docker build --tag " $docker_tag " --cache-from " $docker_tag " .
104
+ echo " Dockerfile:" >> output.log 2>&1
105
+ echo " $dockerfile " >> output.log 2>&1
106
+ docker build --tag " $docker_tag " --cache-from " $docker_tag " . >> output.log 2>&1
106
107
# Update the user's repository with the customised docker image, ready for the
107
108
# next Github Actions run.
108
- docker push " $docker_tag "
109
+ docker push " $docker_tag " >> output.log 2>&1
0 commit comments