removed INPUTS

This commit is contained in:
Serhiy Mytrovtsiy 2019-11-11 13:12:02 +01:00
parent 25e478115b
commit 5ecadb2371
3 changed files with 10 additions and 30 deletions

View file

@ -10,13 +10,12 @@ To use stylelint in your workflow just add this step:
```
## Configuration
Action has 3 parameters which you can set:
- PATTERN - Pattern for style files.
- CONFIG_PATH - Path to stylelint configuration file
- INDENT_SPACE - Space indentation
This parameter can be set throw environment variables:
This parameters can be set throw environment variables:
```yaml
- uses: actions-hub/stylelint@master
env:
@ -24,14 +23,6 @@ This parameter can be set throw environment variables:
PATTERN: "*.scss"
```
Or throw inputs:
```bash
- uses: actions-hub/stylelint@master
with:
indent_spaces: 4
pattern: "*.scss"
```
### .stylelintrc
By default, action will try to find an existing configuration file in the project.
If the configuration file will not found, it will be created with the next configuration:
@ -50,19 +41,17 @@ If you want to specify which file or types must be validated.
You need to pass the pattern as a `PATTERN` variable.
By default, it will try to find `*.css`.
### Indentation
Indentation can be set by environment variable `INDENT_SPACES`.
By default space, indent is 2.
```yaml
- uses: actions-hub/stylelint@master
with:
indent_spaces: 4
ENV:
INDENT_SPACES: 4
```
## Example
### Default values
```bash
name: Test
@ -91,9 +80,9 @@ jobs:
steps:
- uses: actions/checkout@v1
- uses: actions-hub/stylelint@master
with:
pattern: "*.scss"
indent_spaces: 4
env:
PATTERN: "*.scss"
INDENT_SPACES: 4
```
## License

View file

@ -4,16 +4,6 @@ author: 'Serhiy Mytrovtsiy <mitrovtsiy@ukr.net>'
branding:
icon: 'layout'
color: 'black'
inputs:
pattern:
description: 'Pattern for style files.'
default: './*.css'
config_path:
description: 'Path to stylelint configuration file.'
default: './'
indent_space:
description: 'Space indentation.'
default: 2
runs:
using: 'docker'
image: 'Dockerfile'

View file

@ -2,9 +2,9 @@
set -e
configPath=$INPUT_CONFIG_PATH
indentSpaces=$INPUT_INDENT_SPACES
pattern=$INPUT_PATTERN
configPath="./"
indentSpaces=2
pattern="*.css"
if [ ! -z "${CONFIG_PATH}" ]; then
configPath=$CONFIG_PATH
@ -32,4 +32,5 @@ fi
echo ::add-path::${stylelint_path}
echo $pattern
sh -c "$stylelint_path $pattern"