From a81bdc9396e9673f01d9913e4c8134d810a20594 Mon Sep 17 00:00:00 2001 From: Tim Werdin Date: Wed, 5 May 2021 10:43:00 +0200 Subject: [PATCH] Fixes issue with docker-entry-point when memory_limit is set --- composer-action.bash | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/composer-action.bash b/composer-action.bash index d49f445..2ea0c1d 100755 --- a/composer-action.bash +++ b/composer-action.bash @@ -131,7 +131,9 @@ fi if [ -n "$ACTION_MEMORY_LIMIT" ] then - command_string="COMPOSER_MEMORY_LIMIT=$ACTION_MEMORY_LIMIT $command_string" + memory_limit="--env COMPOSER_MEMORY_LIMIT=$ACTION_MEMORY_LIMIT" +else + memory_limit='' fi echo "Command: $command_string" >> output.log 2>&1 @@ -149,6 +151,7 @@ docker run --rm \ --volume "/tmp/composer-cache":/tmp/composer-cache \ --workdir /app \ --env-file <( env| cut -f1 -d= ) \ + ${memory_limit} \ ${docker_tag} ${command_string} echo "::set-output name=full_command::${command_string}"