Skip to content

Memory increase #13

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Feb 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 18 additions & 3 deletions php-build.bash
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
set -e

php_build_version="build2.1.0"
php_build_version="build2.1.1"

# Check for required variables:
if [ "$#" -lt 1 ]; then
Expand Down Expand Up @@ -73,6 +73,14 @@ do
done
dockerfile_unique="${dockerfile_unique}-${php_build_version}"

dockerfile="${dockerfile}
ADD ./php-build.ini /usr/local/etc/php/conf.d"

cat > ./php-build.ini<< EOF
;INI settings to set within Github Action's build runner
memory_limit=4G
EOF

# Remove illegal characters and make lowercase:
GITHUB_REPOSITORY="${GITHUB_REPOSITORY,,}"
dockerfile_unique="${dockerfile_unique// /_}"
Expand Down Expand Up @@ -105,9 +113,16 @@ echo "Building PHP $ACTION_PHP_VERSION with extensions: $ACTION_PHP_EXTENSIONS .
# need to re-build, and the `docker build` step should use the cached layers of
# what has just been pulled.
echo "$dockerfile" > Dockerfile-php-build
echo "Dockerfile:" >> output.log 2>&1
echo "$dockerfile" >> output.log 2>&1
if [ ACTIONS_RUNNER_DEBUG = "true" ]
then
echo "Dockerfile:"
echo "$dockerfile"
echo docker build --tag "$docker_tag" --cache-from "$docker_tag" --file Dockerfile-php-build .

fi

docker build --tag "$docker_tag" --cache-from "$docker_tag" --file Dockerfile-php-build . >> output.log 2>&1

# Update the user's repository with the customised docker image, ready for the
# next Github Actions run.
if ! docker push "$docker_tag" >> output.log 2>&1; then
Expand Down