Skip to content

Commit b2b33b9

Browse files
author
Greg Bowler
committed
Pass host env to docker
1 parent ff9d827 commit b2b33b9

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

composer-action.bash

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,7 @@ fi
132132
echo "Command: $command_string" >> output.log 2>&1
133133
mkdir -p /tmp/composer-cache
134134

135-
docker_env=/tmp/docker_env
136-
printenv > $docker_env
137-
cat $docker_env
138-
echo COMPOSER_CACHE_DIR="/tmp/composer-cache" >> $docker_env
135+
export COMPOSER_CACHE_DIR="/tmp/composer-cache"
139136

140137
docker run --rm \
141138
--volume "${github_action_path}/composer.phar":/usr/local/bin/composer \
@@ -144,7 +141,7 @@ docker run --rm \
144141
--volume "${GITHUB_WORKSPACE}":/app \
145142
--volume "/tmp/composer-cache":/tmp/composer-cache \
146143
--workdir /app \
147-
--env-file "$docker_env" \
144+
--env-file <( env| cut -f1 -d= ) \
148145
${docker_tag} ${command_string}
149146

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

0 commit comments

Comments
 (0)