Links validator #162
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Links validator | |
on: | |
schedule: | |
# At 09:00 on Monday: https://crontab.guru/#0_9_*_*_1 | |
- cron: '0 9 * * 1' | |
jobs: | |
linkChecker: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Check links | |
uses: lycheeverse/lychee-action@v1.3.2 | |
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@v3 | |
with: | |
title: Automated Links Checker Report for ${{ steps.date.outputs.now }} | |
content-filepath: ./lychee/out.md | |
labels: links validator |