Skip to content

Commit 59e915e

Browse files
author
Greg Bowler
authored
Merge pull request #13 from php-actions/memory-increase
Memory increase
2 parents 307e4e4 + c2f6f2f commit 59e915e

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

Diff for: php-build.bash

+18-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22
set -e
33

4-
php_build_version="build2.1.0"
4+
php_build_version="build2.1.1"
55

66
# Check for required variables:
77
if [ "$#" -lt 1 ]; then
@@ -73,6 +73,14 @@ do
7373
done
7474
dockerfile_unique="${dockerfile_unique}-${php_build_version}"
7575

76+
dockerfile="${dockerfile}
77+
ADD ./php-build.ini /usr/local/etc/php/conf.d"
78+
79+
cat > ./php-build.ini<< EOF
80+
;INI settings to set within Github Action's build runner
81+
memory_limit=4G
82+
EOF
83+
7684
# Remove illegal characters and make lowercase:
7785
GITHUB_REPOSITORY="${GITHUB_REPOSITORY,,}"
7886
dockerfile_unique="${dockerfile_unique// /_}"
@@ -105,9 +113,16 @@ echo "Building PHP $ACTION_PHP_VERSION with extensions: $ACTION_PHP_EXTENSIONS .
105113
# need to re-build, and the `docker build` step should use the cached layers of
106114
# what has just been pulled.
107115
echo "$dockerfile" > Dockerfile-php-build
108-
echo "Dockerfile:" >> output.log 2>&1
109-
echo "$dockerfile" >> output.log 2>&1
116+
if [ ACTIONS_RUNNER_DEBUG = "true" ]
117+
then
118+
echo "Dockerfile:"
119+
echo "$dockerfile"
120+
echo docker build --tag "$docker_tag" --cache-from "$docker_tag" --file Dockerfile-php-build .
121+
122+
fi
123+
110124
docker build --tag "$docker_tag" --cache-from "$docker_tag" --file Dockerfile-php-build . >> output.log 2>&1
125+
111126
# Update the user's repository with the customised docker image, ready for the
112127
# next Github Actions run.
113128
if ! docker push "$docker_tag" >> output.log 2>&1; then

0 commit comments

Comments
 (0)