forked from pingcap/docs-cn
-
Notifications
You must be signed in to change notification settings - Fork 1
31 lines (26 loc) · 962 Bytes
/
link-fail-fast.yaml
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
name: Links (Fail Fast)
on:
pull_request:
jobs:
linkChecker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 2
- name: 'Get a list of changed markdown files to process'
id: changed-files
run: |
CHANGED_FILES=$(git diff-tree --name-only --diff-filter 'AM' -r HEAD^1 HEAD -- "*.md" | sed -z "s/\n$//;s/\n/' '/g")
echo "::set-output name=all_changed_files::${CHANGED_FILES}"
- name: Download Exclude Path
run: |
curl https://raw.githubusercontent.com/pingcap/docs/master/.lycheeignore -O
- name: Link Checker
if: ${{ steps.changed-files.outputs.all_changed_files }}
uses: lycheeverse/[email protected]
with:
fail: true
args: -E --exclude-mail -i -n -t 45 -- '${{ steps.changed-files.outputs.all_changed_files }}'
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}