mirror of
https://github.com/auricom/home-cluster.git
synced 2025-12-29 09:45:23 +01:00
49 lines
1.5 KiB
YAML
49 lines
1.5 KiB
YAML
---
|
|
name: "Broken Link Check"
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
schedule:
|
|
- cron: "0 0 * * 0"
|
|
|
|
jobs:
|
|
check-links:
|
|
name: Check Links
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Generate Token
|
|
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0
|
|
id: generate-token
|
|
with:
|
|
app_id: "${{ secrets.BOT_APP_ID }}"
|
|
private_key: "${{ secrets.BOT_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@ec3ed119d4f44ad2673a7232460dc7dff59d2421 # v1.8.0
|
|
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@f5661581217cc78cc282d1351aa65bd8bd155003 # v2.2.1
|
|
with:
|
|
state: open
|
|
labels: broken-links
|
|
|
|
- name: Update Issue
|
|
uses: peter-evans/create-issue-from-file@433e51abf769039ee20ba1293a088ca19d573b7f # v4.0.1
|
|
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
|