generated from onedr0p/cluster-template
-
-
Notifications
You must be signed in to change notification settings - Fork 6
54 lines (48 loc) · 1.62 KB
/
schedule-link-checker.yaml
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
47
48
49
50
51
52
53
54
---
name: Broken Link Check
on: # yamllint disable-line rule:truthy
workflow_dispatch:
schedule:
- cron: "0 0 * * *"
jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- name: Generate Token
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0
id: generate-token
with:
app_id: "${{ secrets.APP_ID }}"
private_key: "${{ secrets.APP_PRIVATE_KEY }}"
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
token: "${{ steps.generate-token.outputs.token }}"
- name: Scan for broken links
uses: lycheeverse/lychee-action@c053181aa0c3d17606addfe97a9075a32723548a # v1.9.3
id: lychee
env:
GITHUB_TOKEN: "${{ steps.generate-token.outputs.token }}"
with:
args: >
--verbose
--no-progress
--exclude-mail
'./**/*.md'
- name: Find Link Checker Issue
id: broken-link-check-issue
uses: micalevisk/last-issue-action@0d40124cc99ac8601c2516007f0c98ef3d27537b # v2.3.0
with:
state: open
labels: |
broken-links
- name: Update Issue
uses: peter-evans/create-issue-from-file@24452a72d85239eacf1468b0f1982a9f3fec4c94 # v5.0.0
with:
title: Broken links detected 🔗
issue-number: "${{ steps.broken-link-check-issue.outputs.issue-number }}"
content-filepath: ./lychee/out.md
token: "${{ steps.generate-token.outputs.token }}"
labels: |
broken-links