Skip to content

Commit f7ffbf8

Browse files
committed
Rename and deprecated some inputs
1 parent fb1eae8 commit f7ffbf8

2 files changed

Lines changed: 34 additions & 14 deletions

File tree

README.md

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,30 @@ Basic usage with all options enabled:
1313
- name: markdownlint-cli
1414
uses: nosborn/github-action-markdown-cli@v4.0.0
1515
with:
16+
cli-version: latest
17+
config-file: .markdownlint.yaml
1618
files: .
17-
config_file: .markdownlint.yaml
18-
ignore_files: examples/ignore/*
19-
ignore_path: examples/.markdownlintignore
19+
ignore-files: examples/ignore/*
20+
ignore-path: examples/.markdownlintignore
2021
rules: examples/rules/custom.js
21-
cli_version: latest
2222
```
2323
2424
## Inputs
2525
2626
- `files` - what to process (files, directories, globs)
27-
- `config_file` (optional) - configuration file (JSON or YAML)
28-
- `ignore_files` (optional) - files to ignore/exclude (file, directory, glob)
29-
- `ignore_path` (optional) - path to file with ignore pattern(s)
27+
- `config` (optional) - configuration file (JSON or YAML)
28+
- `ignore` (optional) - files to ignore/exclude (file, directory, glob)
29+
- `ignore-path` (optional) - path to file with ignore patterns
3030
- `rules` (optional) - custom rule files (file, directory, glob, package)
31-
- `cli_version` (optional) - version of markdownlint-cli to use, default `latest`
31+
- `cli-version` (optional) - version of markdownlint-cli to use, default `latest`
32+
33+
### Deprecated inputs
34+
35+
These inputs are still available but will be removed in a future major version.
36+
37+
- `config_file` (optional) - configuration file (JSON or YAML) - superseded by `config`
38+
- `ignore_files` (optional) - files to ignore/exclude (file, directory, glob) - superseded by `ignore`
39+
- `ignore_path` (optional) - path to file with ignore patterns - superseded by `ignore-path`
3240

3341
## License
3442

action.yml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,31 @@ author: Nick Osborn
55
description: Style checker and lint tool for Markdown/CommonMark files.
66

77
inputs:
8-
cli_version:
8+
cli-version:
99
description: version of markdownlint-cli to use
1010
required: true
1111
default: latest
12+
config:
13+
description: configuration file (JSON or YAML)
14+
required: false
1215
config_file:
1316
description: configuration file (JSON or YAML)
1417
required: false
18+
deprecationMessage: Please use 'config' instead.
1519
files:
1620
description: files, directories, or globs
1721
required: true
22+
ignore:
23+
description: files to ignore/exclude
24+
required: false
25+
ignore-path:
26+
description: path to file with ignore pattern(s)
27+
required: false
28+
deprecationMessage: Please use 'ignore-path' instead.
1829
ignore_files:
1930
description: files to ignore/exclude
2031
required: false
32+
deprecationMessage: Please use 'ignore' instead.
2133
ignore_path:
2234
description: path to file with ignore pattern(s)
2335
required: false
@@ -39,7 +51,7 @@ runs:
3951
4052
markdownlint="${prefix}/bin/markdownlint"
4153
markdownlint="${markdownlint}${INPUT_CONFIG_FILE:+ -c ${INPUT_CONFIG_FILE:?}}"
42-
markdownlint="${markdownlint}${INPUT_IGNORE_FILES:+ -i ${INPUT_IGNORE_FILES:?}}"
54+
markdownlint="${markdownlint}${INPUT_IGNORE:+ -i ${INPUT_IGNORE:?}}"
4355
markdownlint="${markdownlint}${INPUT_IGNORE_PATH:+ -p ${INPUT_IGNORE_PATH:?}}"
4456
markdownlint="${markdownlint}${INPUT_RULES:+ -r ${INPUT_RULES:?}}"
4557
@@ -51,11 +63,11 @@ runs:
5163
exit ${rc:-0}
5264
shell: bash
5365
env:
54-
INPUT_CLI_VERSION: ${{ inputs.cli_version }}
55-
INPUT_CONFIG_FILE: ${{ inputs.config_file }}
66+
INPUT_CLI_VERSION: ${{ inputs.cli-version }}
67+
INPUT_CONFIG_FILE: ${{ inputs.config || inputs.config_file }}
5668
INPUT_FILES: ${{ inputs.files }}
57-
INPUT_IGNORE_FILES: ${{ inputs.ignore_files }}
58-
INPUT_IGNORE_PATH: ${{ inputs.ignore_path }}
69+
INPUT_IGNORE: ${{ inputs.ignore || inputs.ignore_files }}
70+
INPUT_IGNORE_PATH: ${{ inputs.ignore-path || inputs.ignore_path }}
5971
INPUT_RULES: ${{ inputs.rules }}
6072
6173
branding:

0 commit comments

Comments
 (0)