mirror of
https://github.com/ibiqlik/action-yamllint.git
synced 2024-11-21 13:51:05 -05:00
Add flags when on of the Configs is specified
This commit is contained in:
parent
db8f332c96
commit
7cb973d6a3
1 changed files with 10 additions and 2 deletions
12
entrypoint.sh
Normal file → Executable file
12
entrypoint.sh
Normal file → Executable file
|
@ -1,7 +1,15 @@
|
|||
#!/bin/sh -l
|
||||
|
||||
if [ ! -z $INPUT_STRICT ]; then
|
||||
if [ ! -z "$INPUT_STRICT" ]; then
|
||||
STRICT="-s"
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue