Skip to content

Commit

Permalink
*: add exit_code check for zh (#370)
Browse files Browse the repository at this point in the history
  • Loading branch information
csuzhangxc authored Sep 9, 2020
1 parent 28ea5f6 commit b85a25d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/link-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,21 @@ jobs:
# - we use `http://172.*` as sample addresses in some docs, so we need to exclude them.
- name: Check external links in zh files
uses: peter-evans/link-checker@v1
id: lczh
with:
args: -c 32 -d /github/workspace -r -x "http://172.*|https://github.com/pingcap/dm/pull/.*|.*.md" zh*

- name: Check external links in en files
id: lc
id: lcen
uses: peter-evans/link-checker@v1
with:
args: -c 32 -d /github/workspace -r -x "http://172.*|https://github.com/pingcap/dm/pull/.*|.*.md" en*

- name: Fail if there were external link errors
if: ${{ steps.lc.outputs.exit_code }}
if: ${{ steps.lczh.outputs.exit_code || steps.lcen.outputs.exit_code }}
run: |
echo "Please check the broken links reported in previous steps \"Check external links in zh files\" and \"Check external links in en files\"."
exit ${{ steps.lc.outputs.exit_code }}
exit ${{ steps.lczh.outputs.exit_code || steps.lcen.outputs.exit_code }}
# Debug via SSH if previous steps failed
#- name: Set up tmate session
Expand Down

0 comments on commit b85a25d

Please sign in to comment.