diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6ff23e9..49941b4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -20,7 +20,7 @@ jobs: steps: - uses: actions/checkout@v3 - uses: ./ - one-glob: + one-glob-file: name: One glob (test/errors.md, 3 errors) runs-on: ubuntu-latest steps: @@ -28,6 +28,14 @@ jobs: - uses: ./ with: globs: test/errors.md + one-glob-pattern: + name: One glob (*.md, 3 errors) + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: ./ + with: + globs: '*.md' two-globs: name: Two globs (README.md and test/errors.md, 3 errors) runs-on: ubuntu-latest @@ -49,6 +57,17 @@ jobs: globs: | config/test.markdownlint.jsonc test/* + command-config-invalid: + name: Command = config (invalid, fails) + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: ./ + with: + command: config + globs: | + invalid.markdownlint.jsonc + test/* command-config-missing: name: Command = config (missing configuration file, fails) runs-on: ubuntu-latest diff --git a/README.md b/README.md index e89c789..f10022d 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ To lint all Markdown files in a project: ```yaml - uses: DavidAnson/markdownlint-cli2-action@v5 with: - globs: "**/*.md" + globs: '**/*.md' ``` To lint specific Markdown files in a project: diff --git a/action.yml b/action.yml index edff190..496ef70 100644 --- a/action.yml +++ b/action.yml @@ -1,18 +1,18 @@ -name: 'markdownlint-cli2-action' -author: 'David Anson' -description: 'A GitHub Action to run the markdownlint-cli2 tool for linting Markdown/CommonMark files with the markdownlint library' +name: markdownlint-cli2-action +author: David Anson +description: A GitHub Action to run the markdownlint-cli2 tool for linting Markdown/CommonMark files with the markdownlint library branding: - icon: 'check-square' - color: 'orange' + icon: check-square + color: orange inputs: command: - description: 'Command to run (unset, "fix", or "config")' + description: Command to run (unset, "fix", or "config") default: '' required: false globs: - description: 'Glob expression(s) of files to lint (newline-delimited)' + description: Glob expression(s) of files to lint (newline-delimited) default: '*.{md,markdown}' required: false runs: - using: 'node16' - main: 'dist/index.js' + using: node16 + main: dist/index.js