From b8efed9a1353a2c8046ca10e83b84df9276e605d Mon Sep 17 00:00:00 2001 From: cuisongliu Date: Wed, 14 Jun 2023 16:24:38 +0800 Subject: [PATCH] refactor(main): fix ci for link error (#3356) Signed-off-by: cuisongliu --- .github/workflows/check-link-error.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/check-link-error.yml b/.github/workflows/check-link-error.yml index 10e2e5be9..c65dd13bd 100644 --- a/.github/workflows/check-link-error.yml +++ b/.github/workflows/check-link-error.yml @@ -3,6 +3,7 @@ name: Check-LinkError on: - push - pull_request_target + - workflow_dispatch jobs: linkChecker: @@ -23,8 +24,10 @@ jobs: echo "$HOME/.local/bin" >> "$GITHUB_PATH" - name: Link Checker run: | + set +e lychee --verbose --format 'markdown' './**/*.md' exit_code=$? + set -e echo "lychee_exit_code=$exit_code" >> $GITHUB_ENV - name: Output the result @@ -38,7 +41,7 @@ jobs: cat report.md - name: Gh Rebot for Sealos uses: labring/gh-rebot@v0.0.6 - if: ${{ (github.event_name != 'push') }} + if: ${{ (github.event_name == 'pull_request_target') }} with: version: v0.0.6 env: