Skip to content

Commit 03bc649

Browse files
author
Greg Bowler
authored
Merge pull request #58 from TimWerdin/hotfix/memory_limit
Fixes issue with docker-entry-point when memory_limit is set
2 parents 8805cce + a81bdc9 commit 03bc649

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

composer-action.bash

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,9 @@ fi
131131

132132
if [ -n "$ACTION_MEMORY_LIMIT" ]
133133
then
134-
command_string="COMPOSER_MEMORY_LIMIT=$ACTION_MEMORY_LIMIT $command_string"
134+
memory_limit="--env COMPOSER_MEMORY_LIMIT=$ACTION_MEMORY_LIMIT"
135+
else
136+
memory_limit=''
135137
fi
136138

137139
echo "Command: $command_string" >> output.log 2>&1
@@ -149,6 +151,7 @@ docker run --rm \
149151
--volume "/tmp/composer-cache":/tmp/composer-cache \
150152
--workdir /app \
151153
--env-file <( env| cut -f1 -d= ) \
154+
${memory_limit} \
152155
${docker_tag} ${command_string}
153156

154157
echo "::set-output name=full_command::${command_string}"

0 commit comments

Comments
 (0)