File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change 60
60
command_string+=($ACTION_ARGS )
61
61
fi
62
62
63
+ dockerKeys=()
64
+ while IFS= read -r line
65
+ do
66
+ dockerKeys+=( $( echo " $line " | cut -f1 -d=) )
67
+ done <<< $( docker run --rm " ${docker_tag} " env)
68
+
69
+ while IFS= read -r line
70
+ do
71
+ key=$( echo " $line " | cut -f1 -d=)
72
+ if printf ' %s\n' " ${dockerKeys[@]} " | grep -q -P " ^${key} \$ "
73
+ then
74
+ echo " Skipping env variable $key " >> output.log
75
+ else
76
+ echo " $line " >> DOCKER_ENV
77
+ fi
78
+ done <<< $( env )
79
+
63
80
echo " Command: " " ${command_string[@]} " >> output.log 2>&1
81
+ echo " ::set-output name=full_command::${command_string} "
82
+
64
83
docker run --rm \
65
84
--volume " ${github_action_path} /phpstan.phar" :/usr/local/bin/phpstan \
66
85
--volume " ${GITHUB_WORKSPACE} " :/app \
67
86
--workdir /app \
87
+ --env-file ./DOCKER_ENV \
68
88
${docker_tag} " ${command_string[@]} "
You can’t perform that action at this time.
0 commit comments