File tree Expand file tree Collapse file tree 2 files changed +45
-1
lines changed Expand file tree Collapse file tree 2 files changed +45
-1
lines changed Original file line number Diff line number Diff line change 23
23
description : " This doesn't seem right"
24
24
color : ' #e4e669'
25
25
# Custom
26
+ - name : automated
27
+ description : Created by a 🤖
28
+ color : ' #000000'
26
29
- name : " can't reproduce"
27
30
color : ' #e95f2c'
28
31
- name : customer-requested
29
- description : was requested by a customer of us
32
+ description : Was requested by a customer of us
30
33
color : ' #068374'
31
34
- name : stale
32
35
color : ' #ededed'
Original file line number Diff line number Diff line change
1
+ name : Broken links
2
+
3
+ on :
4
+ workflow_dispatch :
5
+ schedule :
6
+ - cron : " 23 23 * * 0"
7
+
8
+ permissions :
9
+ issues : write
10
+
11
+ jobs :
12
+ link-checker :
13
+ runs-on : ubuntu-latest
14
+ steps :
15
+ - uses : actions/checkout@v4
16
+
17
+ - name : Link Checker
18
+ id : lychee
19
+ uses : lycheeverse/lychee-action@v1
20
+
21
+ - name : Find already existing issue
22
+ id : find-issue
23
+ run : |
24
+ echo "number=$(gh issue list -l 'bug' -l 'automated' -L 1 -S 'in:title \"Link Checker Report\"' -s 'open' --json 'number' --jq '.[].number')" >> $GITHUB_OUTPUT
25
+ env :
26
+ GH_TOKEN : ${{ github.token }}
27
+
28
+ - name : Close issue if everything is fine
29
+ if : env.lychee_exit_code == 0 && steps.find-issue.outputs.number != ''
30
+ run : gh issue close -r 'not planned' ${{ steps.find-issue.outputs.number }}
31
+ env :
32
+ GH_TOKEN : ${{ github.token }}
33
+
34
+ - name : Create Issue From File
35
+ if : env.lychee_exit_code != 0
36
+ uses : peter-evans/create-issue-from-file@v5
37
+ with :
38
+ issue-number : ${{ steps.find-issue.outputs.number }}
39
+ title : Link Checker Report
40
+ content-filepath : ./lychee/out.md
41
+ labels : bug, automated
You can’t perform that action at this time.
0 commit comments