mirror of
https://github.com/m3y54m/Embedded-Engineering-Roadmap.git
synced 2026-10-11 16:58:10 +03:00
ci: add link checker, README convention check and PR templat
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
name: Link check
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 6 * * 1"
|
||||
pull_request:
|
||||
paths:
|
||||
- "**/*.md"
|
||||
- ".github/lychee.toml"
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
issues: write
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
lychee:
|
||||
name: Check links
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Check links
|
||||
id: lychee
|
||||
uses: lycheeverse/lychee-action@v2
|
||||
with:
|
||||
args: --config .github/lychee.toml --no-progress "**/*.md"
|
||||
output: lychee/out.md
|
||||
# Pull requests report broken links without blocking; scheduled runs fail and open an issue.
|
||||
fail: ${{ github.event_name != 'pull_request' }}
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Report broken links
|
||||
if: github.event_name != 'pull_request' && steps.lychee.outputs.exit_code != 0
|
||||
uses: peter-evans/create-issue-from-file@v5
|
||||
with:
|
||||
title: Link check report
|
||||
content-filepath: lychee/out.md
|
||||
labels: broken-links
|
||||
Reference in New Issue
Block a user