2023-01-03 05:43:11 -05:00
|
|
|
name: Links validator
|
|
|
|
|
|
|
|
on:
|
2023-01-03 05:50:44 -05:00
|
|
|
repository_dispatch:
|
|
|
|
workflow_dispatch:
|
2023-01-03 05:43:11 -05:00
|
|
|
schedule:
|
|
|
|
# At 09:00 on Monday: https://crontab.guru/#0_9_*_*_1
|
2023-07-19 12:16:49 -04:00
|
|
|
- cron: "0 9 30 * 0"
|
2023-01-03 05:43:11 -05:00
|
|
|
|
|
|
|
jobs:
|
2023-01-03 09:17:01 -05:00
|
|
|
link_checker:
|
|
|
|
name: Link Checker
|
2023-01-03 05:43:11 -05:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Check links
|
|
|
|
uses: lycheeverse/lychee-action@v1.5.4
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
args: --verbose --no-progress --timeout 10 --max-concurrency 2 --exclude 'twitter.com' -- './**/*.md'
|
|
|
|
output: ./lychee/out.md
|
|
|
|
|
|
|
|
- name: Get current date
|
|
|
|
id: date
|
|
|
|
run: echo "::set-output name=now::$(date +'%d-%m-%Y')"
|
|
|
|
|
|
|
|
- name: Create issue when fail
|
|
|
|
if: ${{ steps.lychee.outputs.exit_code }} != 0
|
|
|
|
uses: peter-evans/create-issue-from-file@v4
|
|
|
|
with:
|
|
|
|
title: Automated Links Checker Report for ${{ steps.date.outputs.now }}
|
|
|
|
content-filepath: ./lychee/out.md
|
|
|
|
labels: links validator
|