From 37d23e38ae21d8c9dca4b3c9ea2782e891bc159c Mon Sep 17 00:00:00 2001 From: Xuecheng Zhang Date: Wed, 9 Sep 2020 16:51:36 +0800 Subject: [PATCH] cherry pick #370 to release-2.0 Signed-off-by: ti-srebot --- .github/workflows/link-check.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/link-check.yaml b/.github/workflows/link-check.yaml index e56226a70..626fc8a3e 100644 --- a/.github/workflows/link-check.yaml +++ b/.github/workflows/link-check.yaml @@ -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