Add flags when on of the Configs is specified

This commit is contained in:
Ilir Bekteshi 2019-10-16 10:47:45 +02:00
parent db8f332c96
commit 7cb973d6a3

12
entrypoint.sh Normal file → Executable file
View file

@ -1,7 +1,15 @@
#!/bin/sh -l #!/bin/sh -l
if [ ! -z $INPUT_STRICT ]; then if [ ! -z "$INPUT_STRICT" ]; then
STRICT="-s" STRICT="-s"
fi fi
yamllint $INPUT_CONFIG_FILE $INPUT_CONFIG_DATA $INPUT_FORMAT $STRICT $INPUT_FILE_OR_DIR if [ ! -z "$INPUT_CONFIG_FILE" ]; then
CONFIG_FILE="-c $INPUT_CONFIG_FILE"
fi
if [ ! -z "$INPUT_CONFIG_DATA" ]; then
CONFIG_DATA="-d $INPUT_CONFIG_DATA"
fi
yamllint $CONFIG_FILE $CONFIG_DATA $INPUT_FORMAT $STRICT $INPUT_FILE_OR_DIR