This action runs Linkspector with Reviewdog on pull requests to improve the quality of your content.
-
Create a new file in your repository
.github/workflows/action.yml
. -
Copy-paste the following workflow in your
action.yml
file:name: Linkspector on: [pull_request] jobs: check-links: name: runner / linkspector runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Run linkspector uses: umbrelladocs/action-linkspector@v1 with: github_token: ${{ secrets.github_token }} reporter: github-pr-review fail_level: any
(Optional) ${{ github.token }}
is used by default.
(Optional) Report level for reviewdog [info,warning,error].
It's same as -level
flag of reviewdog. Linkspector only reports errors, so if you change this value, you will not see any output.
Reporter of reviewdog command [github-pr-check,github-pr-review,github-check].
Default is github-pr-check
.
github-pr-review
can use Markdown and add a link to rule page in reviewdog reports.
For more details, see Reporters.
(Optional) Filtering mode for the reviewdog command [added,diff_context,file,nofilter], the default value is added
.
added
: Show errors only in the added lines (with the+
prefix).diff_context
: Show errors in the diff context, that is changed lines +-N lines (N=3 for example).file
: Show errors for added and modified files even if the results are not in actual diff.nofilter
: Show all errors across all files.
For more details, please see Filter mode support table.
(Optional) Exit code for reviewdog when errors are found with severity greater than or equal to the given level [none,any,info,warning,error].
Default is none
.
(Optional, deprecated) Exit code for reviewdog when errors are found [true,false]. This option is ignored if fail_level
is used.
Default is false
.
(Optional) Additional reviewdog flags.
(Optional) Path to your linkspector configuration file .linkspector.yml
.
For more details, see Linkspector configuration.
Following is a list of some of the repositories which are using GitHub Action - Markdown link check.
If you are using this on production, consider buying me a coffee ☕.