This is an automated email from the ASF dual-hosted git repository.
klesh pushed a commit to branch kw-fix-ci
in repository https://gitbox.apache.org/repos/asf/incubator-devlake-website.git
The following commit(s) were added to refs/heads/kw-fix-ci by this push:
new f7575d60ce fix: daily check didn't create issue
f7575d60ce is described below
commit f7575d60ce719cec3db82296494a31ceaac1c700
Author: Klesh Wong <[email protected]>
AuthorDate: Wed May 17 14:50:55 2023 +0800
fix: daily check didn't create issue
---
.github/workflows/link-schedule.yaml | 19 +++----------------
1 file changed, 3 insertions(+), 16 deletions(-)
diff --git a/.github/workflows/link-schedule.yaml
b/.github/workflows/link-schedule.yaml
index 4712c772d4..a2cd519039 100644
--- a/.github/workflows/link-schedule.yaml
+++ b/.github/workflows/link-schedule.yaml
@@ -50,30 +50,17 @@ jobs:
# 'build': the site directory to check
# './*.md': all markdown files in the root directory
run: |
- set +e
# run lychee
- LYCHEE_TMP="$(mktemp)"
GITHUB_WORKFLOW_URL="https://github.com/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}?check_suite_focus=true"
if ! lychee --output ${OUTPUT_FILE} \
-E -i -n -t 5 --max-concurrency 64 -a 429,401,403 -m 10 -f
markdown -s http -s https -X HEAD \
- '**/*.md'
+ '**/*.md'
then
echo "" >> "${OUTPUT_FILE}" # add a new line
echo "[Full Github Actions output](${GITHUB_WORKFLOW_URL})" >>
"${OUTPUT_FILE}"
+ gh auth login --with-token <<< "${{ secrets.GITHUB_TOKEN }}"
+ gh issue create --title "Broken links found in the website"
--body-file "${OUTPUT_FILE}" --repo "${GITHUB_REPOSITORY}" --assignee
"${GITHUB_ACTOR}" --label "bug"
exit 1
- else
- rm -f "${OUTPUT_FILE}"
- fi
- # if lychee run failed, create an issue
- - name: Create Issue From File
- # it is better to use peter-evans/create-issue-from-file
- # but it is not available due to the limitation of Apache
- run: |
- if [ ! -f "${OUTPUT_FILE}" ]; then
- echo "No broken links found. Exiting."
- exit 0
fi
- gh auth login --with-token <<< "${{ secrets.GITHUB_TOKEN }}"
- gh issue create --title "Broken links found in the website"
--body-file "${OUTPUT_FILE}" --repo "${GITHUB_REPOSITORY}" --assignee
"${GITHUB_ACTOR}" --label "bug"