ci: add link-checker workflow

- merge closed-references and link-checker
- add issue number to update
This commit is contained in:
jo 2022-02-09 11:41:07 +01:00 committed by Jonas L
parent 328e36168d
commit dae1420a5b
2 changed files with 61 additions and 29 deletions

View File

@ -1,29 +0,0 @@
name: Closed Reference Notifier
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
inputs:
issueLimit:
description: Max. number of issues to create
required: true
default: "5"
jobs:
find_closed_references:
if: github.repository_owner == 'LibreTime'
name: Find closed references
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: "16"
- uses: ory/closed-reference-notifier@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
issueLimit: ${{ github.event.inputs.issueLimit || '5' }}

61
.github/workflows/housekeeping.yml vendored Normal file
View File

@ -0,0 +1,61 @@
name: Housekeeping
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
inputs:
issueLimit:
description: Max. number of issues to create
required: true
default: "5"
jobs:
find_closed_references:
if: github.repository_owner == 'LibreTime'
name: Find closed references
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: "16"
- uses: ory/closed-reference-notifier@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
issueLimit: ${{ github.event.inputs.issueLimit || '5' }}
find_broken_links:
if: github.repository_owner == 'LibreTime'
name: Find broken links
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Check Links
id: lychee
uses: lycheeverse/lychee-action@v1.2.1
with:
args: >-
'**/*.md'
--require-https
--exclude-all-private
--exclude-mail
--exclude 'example\.(com|org)'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create Report
if: ${{ steps.lychee.outputs.exit_code != 0 }}
uses: peter-evans/create-issue-from-file@v3
with:
issue-number: 1589
title: Link Checker Report
content-filepath: ./lychee/out.md
labels: |
is: documentation
ci