Skip to content

Commit

Permalink
Default input and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
limitusus committed Oct 28, 2020
1 parent 41b57c4 commit 7a5579a
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 5 deletions.
24 changes: 20 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Simple JSON syntax checker

### `pattern`

**Required** file pattern to check syntax. Default is `'\.json$'`.
**Required** file pattern to check syntax. Default is `'\\.json$'`.

## Outputs

Expand All @@ -16,8 +16,24 @@ File names whose syntax check failed in JSON list format.

## Example

Your `.github/workflow/jsoncheck.yml` may look like:

```yaml
uses: actions/json-syntax-check@v1
with:
pattern: '\.json$'
name: JSON check

on:
push:
paths:
- '**.json'
pull_request:

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: json-syntax-check
uses: limitusus/json-syntax-check@v1
with:
pattern: "\\.json$"
```
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ inputs:
pattern:
description: 'File regex pattern to check syntax'
required: true
default: '\.json$'
default: '\\.json$'
outputs:
failed_files:
description: 'File paths whose syntax check failed'
Expand Down

0 comments on commit 7a5579a

Please sign in to comment.