-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# action-char-count | ||
|
||
This GitHub Action counts the number of the characters in the files that match the pattern and comments it on the pull request. | ||
|
||
## Inputs | ||
### `token` | ||
|
||
**Required** The GitHub Token to create a comment on a pull request. | ||
|
||
### `patterns` | ||
|
||
**Required** A list of files, and wildcard patterns to count the number of characters. See [@actions/glob](https://github.com/actions/toolkit/tree/master/packages/glob) for supported patterns. | ||
|
||
## Example Usage | ||
|
||
This is the example of counting the number of the characters in the all markdown files under the `articles` directory. | ||
|
||
```yaml | ||
on: | ||
pull_request: | ||
paths: | ||
- "articles/**/*.md" | ||
|
||
jobs: | ||
char-count: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checokut@v2 | ||
- uses: nobu09/action-char-count@v1.0.0 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
patterns: articles/**/*.md | ||
``` |