generated from SAP/repository-template
-
Notifications
You must be signed in to change notification settings - Fork 334
46 lines (43 loc) · 1.21 KB
/
periodic-link-watcher.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: Periodic Link Checker
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
permissions:
contents: read
pull-requests: write
issues: write
jobs:
link-checker:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Link Checker
id: lychee
uses: lycheeverse/lychee-action@v2.1.0
with:
args: --verbose --no-progress --exclude-loopback .
output: ./lychee/out.md
fail: true
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Find existing issue
id: find_issue
uses: micalevisk/last-issue-action@v2
if: failure()
with:
state: open
labels: |
broken link
automated issue
- name: Create or update issue for broken links
id: create_issue
uses: peter-evans/create-issue-from-file@v5
if: failure()
with:
title: Link Checker Report
# If issue number is empty a new issue gets created
issue-number: ${{ steps.find_issue.outputs.issue-number }}
content-filepath: ./lychee/out.md
labels: broken link, automated issue