This action runs Linkspector with Reviewdog on pull requests to improve the quality of your content.
If you are using this on production, consider buying me a coffee ☕.
-
Create a new file in your repository
.github/workflows/action.yml. -
Copy-paste the following workflow in your
action.ymlfile:name: Linkspector on: [pull_request] jobs: check-links: name: runner / linkspector runs-on: ubuntu-latest steps: - uses: actions/checkout@v5 - 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.
(Optional) Show statistics about the checked links [true,false].
Default is false.
Note: Enabling the show_stats option causes Linkspector to run twice: once for reporting and again to collect statistics. Using this will increase the total run time of the action.
This action automatically detects arm64 runners and self-hosted runners where Puppeteer's bundled Chromium may not work. In these cases, it installs system Chromium using the appropriate package manager (apt, dnf, yum, apk, zypper, or pacman).
If your runner already has Chrome or Chromium installed, the action detects it and skips installation.
If you need to point to a specific Chromium/Chrome binary, set the PUPPETEER_EXECUTABLE_PATH environment variable in your workflow to skip all automatic Chromium setup:
- name: Run linkspector
uses: umbrelladocs/action-linkspector@v1
env:
PUPPETEER_EXECUTABLE_PATH: /usr/bin/chromium
with:
github_token: ${{ secrets.github_token }}
reporter: github-pr-review







