yamllint/entrypoint.sh

20 lines
402 B
Bash
Raw Normal View History

2019-10-16 10:43:28 +02:00
#!/bin/sh -l
echo "======================"
echo "= Linting YAML files ="
echo "======================"
if [ ! -z "$INPUT_STRICT" ]; then
2019-10-16 10:43:28 +02:00
STRICT="-s"
fi
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