GitXplorerGitXplorer
p

link-checker

public
49 stars
11 forks
6 issues

Commits

List of commits on branch master.
Unverified
482f0e73fe7f12e9a27deef9245725e9e7ab7a56

Update readme

ppeter-evans committed 4 years ago
Unverified
88496c91776d489088f8b1981ff161b18f776cd7

Update slash command dispatch to v2

ppeter-evans committed 4 years ago
Unverified
1550e465100cd0b8712bd642f881a8bd2cbc6932

Update slash command dispatch

ppeter-evans committed 5 years ago
Unverified
41c97244bb50a4a1b273d60abf5b5862b09f0c2d

Update README

ppeter-evans committed 5 years ago
Unverified
11e532490885d6044e43e56d8e422e59c1a0bae4

Update workflow

ppeter-evans committed 5 years ago
Unverified
bc9495609301da345ab51ea3eeb70a2dceefa19c

Add missing input definition

ppeter-evans committed 5 years ago

README

The README file for this repository.

Link Checker

GitHub Marketplace

⚠️ This action is deprecated. Please consider using lychee-action.

A GitHub action for link checking repository Markdown and HTML files.

When used in conjunction with Create Issue From File, issues will be created when Link Checker finds connectivity problems with links.

Usage

Using with the default settings will check all markdown and HTML files in your repository.

    - name: Link Checker
      uses: peter-evans/link-checker@v1

Link Checker uses Liche. Liche arguments can be passed to the action via the args parameter. If not set, the default -v -r * will be used.

    - name: Link Checker
      uses: peter-evans/link-checker@v1
      with:
        args: -v -r *

See Liche's documentation for further argument details.

Optional environment variables

If Link Checker finds connectivity problems with links the action will output a markdown file containing the error report. The default path is link-checker/out.md. The path and filename may be overridden with the following variables.

  • LINKCHECKER_OUTPUT_DIR - The output directory the markdown error report
  • LINKCHECKER_OUTPUT_FILENAME - The error report filename

Receiving issues containing the error report

Below is an example of using this action in conjunction with Create Issue From File. The workflow executes on a schedule every month. Issues will be created when Link Checker finds connectivity problems with links.

on:
  schedule:
  - cron: '0 0 1 * *'
name: Check markdown links
jobs:
  linkChecker:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Link Checker
        uses: peter-evans/link-checker@v1
      - name: Create Issue From File
        uses: peter-evans/create-issue-from-file@v2
        with:
          title: Link Checker Report
          content-filepath: ./link-checker/out.md
          labels: report, automated issue

Issue sample

This link is intentionally non-existent. The workflow in this repository generated this sample issue.

Creating a failing check for link errors

To create a failing check when there are link errors you can use the exit_code output from the action as follows.

on: push
jobs:
  linkChecker:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: Link Checker
      id: lc
      uses: peter-evans/link-checker@v1
    - name: Fail if there were link errors
      run: exit ${{ steps.lc.outputs.exit_code }}

License

MIT