Repository navigation
Expand file tree
/
Copy pathaction.yml
More file actions
60 lines (58 loc) · 2.34 KB
/
Copy pathaction.yml
File metadata and controls
60 lines (58 loc) · 2.34 KB
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
# The jsonvet GitHub Action: `uses: simonvanlierde/jsonvet@v3`. It installs jsonvet from PyPI
# into a virtual environment, so it needs only the Python that every hosted runner has.
name: jsonvet
description: Check JSON, I-JSON, JSONC, JWCC, JSON5 and JSON Lines for syntax errors and duplicate keys, with JSON Schema and SARIF
author: Simon van Lierde
branding:
icon: check-square
color: green
inputs:
files:
description: >-
Files or folders to check: paths or globs, separated by spaces. `**` matches any number of
folders, and a glob matches files only. By default, every tracked file the pre-commit hook
would check.
required: false
default: ""
args:
description: >-
Extra jsonvet options, separated by spaces, such as `--strict package.json`. On pull
requests, do not pass `--config` a file the pull request can change: let the search find it.
required: false
default: ""
sarif:
description: >-
Also write a SARIF file to this path, for github/codeql-action/upload-sarif. The log and the
annotations stay as they are.
required: false
default: ""
version:
description: >-
The jsonvet version to install from PyPI: `X.Y.Z` (also a pre- or post-release such as
`3.0.0rc1` or `3.0.0.post1`), `X.*`, `X.Y.*` or `latest`. By default, the version of the
action's tag: `v3` installs the newest 3.x, and `v3.0.0` installs 3.0.0. A commit SHA or
branch installs the release named in that commit's Cargo.toml.
required: false
default: ""
verify:
description: >-
Check the wheel's build provenance attestation with the GitHub CLI before installing it: the
wheel must come from jsonvet's release workflow. `false` skips the check, as GitHub
Enterprise Server needs. On a runner without `gh`, the wheel is installed unchecked with a
notice, and so is a release before 3.1.0, which has no attestation.
required: false
default: "true"
runs:
using: composite
steps:
- name: Run jsonvet
shell: bash
env:
FILES: ${{ inputs.files }}
ARGS: ${{ inputs.args }}
SARIF: ${{ inputs.sarif }}
VERSION: ${{ inputs.version }}
VERIFY: ${{ inputs.verify }}
GH_TOKEN: ${{ github.token }}
ACTION_REF: ${{ github.action_ref }}
run: bash "$GITHUB_ACTION_PATH/scripts/action.sh"