File tree Expand file tree Collapse file tree 1 file changed +16
-10
lines changed Expand file tree Collapse file tree 1 file changed +16
-10
lines changed Original file line number Diff line number Diff line change @@ -2,12 +2,11 @@ name: Daily Broken Link Check
22
33on :
44 schedule :
5- - cron : ' 0 2 * * *' # Every day at 2:00 AM UTC
5+ - cron : ' 0 0 * * *' # Daily at midnight UTC
66 workflow_dispatch :
77
88jobs :
9- lychee :
10- name : Broken Link Checker
9+ broken-link-check :
1110 runs-on : ubuntu-latest
1211
1312 steps :
@@ -24,16 +23,23 @@ jobs:
2423 --no-progress
2524 --exclude ^https?://
2625 '**/*.md'
27- output : lychee/out.md # ✅ Set output file here, not in args
26+ output : lychee/out.md
2827 env :
2928 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
3029
31- - name : Create or update GitHub Issue if broken links found
32- if : failure()
33- uses : peter-evans/create-issue-from-file@v4
30+ - name : Find existing broken-link issue
31+ uses : micalevisk/last-issue-action@v2
32+ id : find_issue
33+ with :
34+ state : open
35+ labels : link-checker
36+
37+ - name : Create or update issue
38+ if : steps.lychee.outputs.exit_code != '0'
39+ uses : peter-evans/create-issue-from-file@v5
3440 with :
3541 title : " Broken Links Detected"
3642 content-filepath : lychee/out.md
37- labels : links
38- update_existing : true
39- issue-pattern : " Broken Links Detected "
43+ labels : link-checker
44+ issue-number : ${{ steps.find_issue.outputs.issue_number }}
45+
You can’t perform that action at this time.
0 commit comments