-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yaml
82 lines (78 loc) · 2.88 KB
/
action.yaml
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
82
---
name: checkton
author: Adam Cmiel <[email protected]>
description: Runs ShellCheck on Tekton yaml files (and other yaml files, but mainly Tekton)
branding:
icon: check-circle
color: purple
inputs:
# inspired by https://github.com/redhat-plumbers-in-action/differential-shellcheck/blob/main/action.yml
differential:
description: >-
Report new violations introduced in a Pull Request, ignore existing violations.
Set to false to report all violations in all files.
required: false
default: true
include-regex:
description: Files paths to include (regex pattern).
required: false
default: '\.ya?ml$'
exclude-regex:
description: Files paths to exclude (regex pattern).
required: false
default: ''
pull-request-base:
description: Hash of the latest commit in the base branch.
required: false
default: ${{ github.event.pull_request.base.sha }}
pull-request-head:
description: Hash of the latest commit in the Pull Request.
required: false
default: ${{ github.event.pull_request.head.sha }}
fail-on-findings:
description: >-
Fail when ShellCheck reports some violations? (May wish to set this to false if you're
going to upload the SARIF report anyway. GitHub takes care of the reporting.)
required: false
default: true
find-renames:
description: >-
Similarity threshold to detect renamed files (see the git-diff manpage).
Set to false to disable finding renames.
required: false
default: 50%
find-copies:
description: >-
Similarity threshold to detect copied files (see the git-diff manpage).
Set to false to disable finding copies.
required: false
default: 50%
find-copies-harder:
description: >-
Inspect unmodified files as candidates for the source of copy.
This is a very expensive operation for large projects, so use it with caution.
(See the git-diff manpage).
required: false
default: false
display-style:
description: >-
Display violations in the specified style. Valid values: csgrep, sarif-fmt
default: sarif-fmt
required: false
outputs:
sarif:
description: Path to the generated SARIF report.
runs:
using: docker
image: docker://ghcr.io/chmeliik/checkton:v0.3.0@sha256:f5a8b20a847be84f37d9561c03635fc5b36e78ca0f8bf5574829867c275c2a08
env:
CHECKTON_DIFFERENTIAL: ${{ inputs.differential }}
CHECKTON_INCLUDE_REGEX: ${{ inputs.include-regex }}
CHECKTON_EXCLUDE_REGEX: ${{ inputs.exclude-regex }}
CHECKTON_DIFF_BASE: ${{ inputs.pull-request-base }}
CHECKTON_DIFF_HEAD: ${{ inputs.pull-request-head }}
CHECKTON_FAIL_ON_FINDINGS: ${{ inputs.fail-on-findings }}
CHECKTON_FIND_RENAMES: ${{ inputs.find-renames }}
CHECKTON_FIND_COPIES: ${{ inputs.find-copies }}
CHECKTON_FIND_COPIES_HARDER: ${{ inputs.find-copies-harder }}
CHECKTON_DISPLAY_STYLE: ${{ inputs.display-style }}