forked from EPMatt/reviewdog-action-tsc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
81 lines (79 loc) · 2.3 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: 'Run tsc with reviewdog'
description: '🐶 Run tsc with reviewdog to improve code checking and review experience for TypeScript-based modules.'
author: 'EPMatt'
inputs:
github_token:
description: 'GITHUB_TOKEN'
default: '${{ github.token }}'
required: false
workdir:
description: |
Working directory relative to the root directory.
This is where the action will look for a
package.json which declares typescript as a dependency.
Default is `.`.
default: '.'
required: false
### Flags for reviewdog ###
level:
description: |
Report level for reviewdog [info,warning,error].
Default is `error`.
default: 'error'
required: false
reporter:
description: |
Reporter of reviewdog command [github-check,github-pr-check,github-pr-review].
Default is `github-pr-check`.
default: 'github-pr-check'
required: false
filter_mode:
description: |
Filtering mode for the reviewdog command [added,diff_context,file,nofilter].
Default is `added`.
default: 'added'
required: false
fail_on_error:
description: |
Exit code for reviewdog when errors are found [true,false].
Default is `false`.
default: 'false'
required: false
reviewdog_flags:
description: |
Additional reviewdog flags.
Default is ``.
default: ''
required: false
tool_name:
description: 'Tool name to use for reviewdog reporter'
default: 'tsc'
required: false
### Flags for tsc ###
tsc_flags:
description: |
Flags and args to pass to tsc.
Default is ``.
default: ''
required: false
runs:
using: 'composite'
steps:
- uses: reviewdog/action-setup@v1
with:
reviewdog_version: v0.17.4
- run: $GITHUB_ACTION_PATH/script.sh
shell: bash
env:
INPUT_GITHUB_TOKEN: ${{ inputs.github_token }}
INPUT_WORKDIR: ${{ inputs.workdir }}
INPUT_LEVEL: ${{ inputs.level }}
INPUT_REPORTER: ${{ inputs.reporter }}
INPUT_FILTER_MODE: ${{ inputs.filter_mode }}
INPUT_FAIL_ON_ERROR: ${{ inputs.fail_on_error }}
INPUT_REVIEWDOG_FLAGS: ${{ inputs.reviewdog_flags }}
INPUT_TOOL_NAME: ${{ inputs.tool_name }}
INPUT_TSC_FLAGS: ${{ inputs.tsc_flags }}
branding:
icon: 'settings'
color: 'blue'