@@ -11,34 +11,36 @@ jobs:
1111 permissions :
1212 issues : write
1313 steps :
14+ - uses : actions/checkout@v4
1415 - name : Restore lychee cache
1516 uses : actions/cache@v4
1617 with :
1718 path : .lycheecache
18- key : cache-lychee-${{ github.sha }}
19+ key : cache-lychee-${{ hashFiles('lychee.toml') }}
1920 restore-keys : cache-lychee-
20- - uses : actions/checkout@v4
2121 - name : Link Checker
2222 id : lychee
2323 uses : lycheeverse/lychee-action@v2
2424 with :
2525 lycheeVersion : " latest"
2626 args : |
27- --cache
28- --verbose
29- --accept '100..=103,200..=299,400,403'
30- --base https://dev.flare.network/
31- --no-progress
32- --insecure
33- --exclude '^(/|https://dev\.flare\.network/|https?://localhost(?::[0-9]+)?/|https://fdc-verifiers-testnet\.flare\.network/|https://github\.com/flare-foundation/flare-hardhat-starter/|https://github\.com/flare-foundation/flare-foundry-starter/|https://sepolia\.etherscan\.io/|https://metamask\.io/|https://openweathermap\.org/|https://www\.gnu\.org/)'
27+ --config lychee.toml
3428 .
3529 fail : true
3630 env :
3731 GITHUB_TOKEN : ${{secrets.GITHUB_TOKEN}}
38- - name : Create Issue From File
32+ - name : Comment on PR if broken links found
3933 if : steps.lychee.outputs.exit_code != 0
40- uses : peter-evans/create-issue-from-file@v5
34+ uses : thollander/actions-comment-pull-request@v3
4135 with :
42- title : Link Checker Report
43- content-filepath : ./lychee/out.md
44- labels : report, automated issue
36+ message : |
37+ ### 🚨 Broken links detected
38+ <details>
39+ <summary>Click to expand</summary>
40+
41+ ```markdown
42+ ${{ steps.lychee.outputs.report }}
43+ ```
44+ </details>
45+ env :
46+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments