-
Notifications
You must be signed in to change notification settings - Fork 120
36 lines (30 loc) · 1012 Bytes
/
link.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Links
on:
repository_dispatch:
workflow_dispatch:
schedule:
- cron: "0 0 * * 1"
jobs:
linkChecker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Download Exclude Path
run: |
curl https://raw.githubusercontent.com/pingcap/docs/master/.lycheeignore --output .lycheeignore
- name: Check Links
uses: lycheeverse/[email protected]
with:
# For parameter description, see https://github.com/lycheeverse/lychee#commandline-parameters
args: -E --exclude-mail -v -i -n -t 45 -- zh/*.md en/*.md *.md
output: out.md
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Create Issue From File
uses: peter-evans/create-issue-from-file@v4
with:
title: Broken Link Detected
content-filepath: out.md
assignees: ran-huang
- name: Fail if there were link errors
run: exit ${{ steps.lychee.outputs.exit_code }}