-
-
Notifications
You must be signed in to change notification settings - Fork 25
/
action.yml
60 lines (60 loc) · 2.21 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: 'Run stylelint with reviewdog'
description: '🐶 Run stylelint with reviewdog on pull requests to improve code review experience.'
author: 'haya14busa (reviewdog)'
inputs:
github_token:
description: 'GITHUB_TOKEN.'
required: true
default: ${{ github.token }}
level:
description: 'Report level for reviewdog [info,warning,error]'
default: 'error'
fail_on_error:
description: 'Whether reviewdog should fail when errors are found. [true,false] - This is useful for failing CI builds.'
default: 'false'
filter_mode:
description: 'Reviewdog filter mode [added, diff_context, file, nofilter]'
default: 'added'
name:
description: 'Report name'
default: 'stylelint'
packages:
description: 'Additional NPM packages'
default: ''
reporter:
description: |
Reporter of reviewdog command [github-pr-check,github-pr-review,github-check].
Default is github-pr-check.
github-pr-review can use Markdown and add a link to rule page in reviewdog reports.
default: 'github-pr-check'
stylelint_input:
description: "Files or glob. Default: `**/*.css`. It's same as `[input]` of stylelint."
default: '**/*.css'
stylelint_config:
description: "It's same as `--config` flag of stylelint."
stylelint_ignore:
description: "Files or glob. It's the same as `--ignore-pattern` of stylelint"
workdir:
description: "The directory from which to look for and run stylelint. Default: '.'"
default: '.'
runs:
using: 'composite'
steps:
- run: $GITHUB_ACTION_PATH/script.sh
shell: bash
env:
REVIEWDOG_VERSION: v0.20.2
INPUT_GITHUB_TOKEN: ${{ inputs.github_token }}
INPUT_LEVEL: ${{ inputs.level }}
INPUT_FAIL_ON_ERROR: ${{ inputs.fail_on_error }}
INPUT_FILTER_MODE: ${{ inputs.filter_mode }}
INPUT_NAME: ${{ inputs.name }}
INPUT_PACKAGES: ${{ inputs.packages }}
INPUT_REPORTER: ${{ inputs.reporter }}
INPUT_STYLELINT_INPUT: ${{ inputs.stylelint_input }}
INPUT_STYLELINT_CONFIG: ${{ inputs.stylelint_config }}
INPUT_STYLELINT_IGNORE: ${{ inputs.stylelint_ignore }}
INPUT_WORKDIR: ${{ inputs.workdir }}
branding:
icon: 'alert-triangle'
color: 'yellow'