This repository has been archived by the owner on Oct 1, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
/
action.yml
37 lines (37 loc) · 1.63 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
name: "Add Annotations"
description: "Given a file and a way to match line, add annotations to a Github check run"
author: "suo"
inputs:
check_name:
description: "The name of the check run to add annotations to.
This should be the same as the job that uses this action."
required: true
linter_output_path:
description: "Location of file containing lines to regex.
Generally this file is the output of a linter.
File location is relative to GITHUB_WORKSPACE."
required: true
commit_sha:
description: "Commit to attach the check to. If the trigger is `push`,
this should just be github.sha. If the trigger is `pull_request`,
this should be the tip of the pull request, obtainable by running
`git rev-parse ${GITHUB_SHA}^2`"
required: true
mode:
description:
required: "Either 'regex' (in which case the linter_output_path file is read
line-by-line and the regex input is used) or 'json' (in which case the
linter_output_path file is expected to be a JSON file containing a single
array of objects, each of which must have the same keys as the capture
groups listed in the description of the regex input)."
default: regex
regex:
description: "Regex that will match against each line of the file.
The following named groups should be captured:
`filename`, `lineNumber`, `columnNumber`, `errorCode`, `errorDesc`.
See the default for an example that works for flake8."
required: true
default: '^(?<filename>.*?):(?<lineNumber>\d+):(?<columnNumber>\d+): (?<errorCode>\w\d+) (?<errorDesc>[\s|\w]*)'
runs:
using: "node12"
main: "lib/main.js"