Skip to content

Commit 358f5a4

Browse files
thibault-martinezAlex6323
authored andcommitted
feat(ci): add links checker (#357)
* feat(ci): add links checker * remove PR
1 parent 06af61b commit 358f5a4

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Links Checker
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: "0 0 * * *"
7+
8+
jobs:
9+
links-checker:
10+
name: Check links and create automated issue if needed
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
14+
15+
- name: Check all links at *.md and doc files
16+
id: lychee
17+
uses: lycheeverse/lychee-action@885c65f3dc543b57c898c8099f4e08c8afd178a2 # v2.6.1
18+
with:
19+
token: ${{ secrets.GITHUB_TOKEN }}
20+
fail: false
21+
22+
- name: Find the last report issue open
23+
uses: micalevisk/last-issue-action@0d40124cc99ac8601c2516007f0c98ef3d27537b # v2.3.0
24+
id: last-issue
25+
with:
26+
state: open
27+
labels: broken-links
28+
29+
- name: Create or update report
30+
if: steps.lychee.outputs.exit_code != 0
31+
uses: peter-evans/create-issue-from-file@e8ef132d6df98ed982188e460ebb3b5d4ef3a9cd # v5.0.1
32+
with:
33+
title: Link checker report
34+
content-filepath: ./lychee/out.md
35+
issue-number: ${{ steps.last-issue.outputs.issue-number }}
36+
labels: broken-links

0 commit comments

Comments
 (0)