forked from bpg/terraform-provider-proxmox
-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (44 loc) · 1.7 KB
/
link-check.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
47
48
49
50
name: "Link Check"
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * 0"
jobs:
link-check:
runs-on: ubuntu-latest
steps:
- name: Generate Short Lived OAuth App Token
uses: actions/create-github-app-token@c8f55efbd427e7465d6da1106e7979bc8aaee856 # v1.10.1
id: app-token
with:
app-id: "${{ secrets.BOT_APP_ID }}"
private-key: "${{ secrets.BOT_APP_PRIVATE_KEY }}"
owner: "${{ github.repository_owner }}"
repositories: "${{ github.event.repository.name }}"
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Link Checker
uses: lycheeverse/lychee-action@2b973e86fc7b1f6b36a93795fe2c9c6ae1118621 # v1.10.0
id: lychee
env:
GITHUB_TOKEN: "${{ steps.app-token.outputs.token }}"
with:
args: --base . --verbose --no-progress './**/*.md' './**/*.html' --exclude-path ./CONTRIBUTORS.md --exclude-path ./CHANGELOG.md
- name: Find Link Checker Issue
id: link-checker-issue
uses: micalevisk/last-issue-action@0d40124cc99ac8601c2516007f0c98ef3d27537b # v2.3.0
if: env.lychee_exit_code != 0
with:
state: open
labels: |
broken-links
- name: Update Issue
uses: peter-evans/create-issue-from-file@24452a72d85239eacf1468b0f1982a9f3fec4c94 # v5.0.0
if: env.lychee_exit_code != 0
with:
title: Broken links detected 🔗
issue-number: "${{ steps.link-checker-issue.outputs.issue-number }}"
content-filepath: ./lychee/out.md
token: "${{ steps.app-token.outputs.token }}"
labels: |
broken-links