diff --git a/README.md b/README.md index ce0c008..caf5680 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ This action deploys ECS services using [fabfuel/ecs-deploy](https://github.com/f ## Example usage ```yml -uses: brunocascio/ecs-deploy@v1.1.0 +uses: brunocascio/ecs-deploy@v1.1.1 with: cluster: theClusterName service: theServiceName diff --git a/entrypoint.sh b/entrypoint.sh index 8f90df7..b336dcd 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -13,7 +13,7 @@ TIMEOUT=${INPUT_TIMEOUT:-300} if [ ! -z "$INPUT_ENVFILE" ]; then [ ! -f $INPUT_ENVFILE ] && echo "$INPUT_ENVFILE not found" && exit 1 - env_variables=$(cat "$INPUT_ENVFILE" | awk -F= -v CONTAINER="$INPUT_CONTAINER" '{print "-e " CONTAINER " " $1 " " "\"" $2 "\""}') + env_variables=$(grep -v '^#' "$INPUT_ENVFILE" | grep . | sed -E 's/=/ /1' | awk -v CONTAINER="$INPUT_CONTAINER" '{print "-e " CONTAINER " " $1 " " $2}') # make string command to be evaluated (one line string) command=$(printf "ecs deploy $INPUT_CLUSTER $INPUT_SERVICE --timeout $TIMEOUT --task $INPUT_TASK $env_variables --exclusive-env") else