mirror of
https://github.com/ibiqlik/action-yamllint.git
synced 2024-11-24 07:11:01 -05:00
Add action, dockerfile, entrypoint
This commit is contained in:
parent
301f739d5f
commit
db8f332c96
3 changed files with 39 additions and 0 deletions
8
Dockerfile
Normal file
8
Dockerfile
Normal file
|
@ -0,0 +1,8 @@
|
|||
FROM python:3-alpine
|
||||
|
||||
RUN pip install yamllint && \
|
||||
rm -rf ~/.cache/pip
|
||||
|
||||
ADD entrypoint.sh /entrypoint.sh
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
24
action.yml
Normal file
24
action.yml
Normal file
|
@ -0,0 +1,24 @@
|
|||
name: 'YAMLLint'
|
||||
description: 'Validate YAML syntax'
|
||||
author: 'ibiqlik'
|
||||
|
||||
inputs:
|
||||
file_or_dir:
|
||||
description: 'File(s) or Directory'
|
||||
required: true
|
||||
config_file:
|
||||
description: 'Path to custom configuration'
|
||||
required: false
|
||||
config_data:
|
||||
description: 'Custom configuration (as YAML source)'
|
||||
required: false
|
||||
format:
|
||||
description: 'Format for parsing output [parsable,standard]'
|
||||
required: false
|
||||
strict:
|
||||
description: 'Return non-zero exit code on warnings as well as errors'
|
||||
required: false
|
||||
|
||||
runs:
|
||||
using: 'docker'
|
||||
image: 'Dockerfile'
|
7
entrypoint.sh
Normal file
7
entrypoint.sh
Normal file
|
@ -0,0 +1,7 @@
|
|||
#!/bin/sh -l
|
||||
|
||||
if [ ! -z $INPUT_STRICT ]; then
|
||||
STRICT="-s"
|
||||
fi
|
||||
|
||||
yamllint $INPUT_CONFIG_FILE $INPUT_CONFIG_DATA $INPUT_FORMAT $STRICT $INPUT_FILE_OR_DIR
|
Loading…
Reference in a new issue