Markdown link check #2716
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: Markdown link check | |
on: | |
schedule: | |
- cron: '5 8 * * *' | |
workflow_dispatch: | |
pull_request: | |
paths: | |
- '**.md' | |
jobs: | |
markdown-link-check: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Extract branch name | |
run: echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_OUTPUT | |
id: extract_branch | |
- uses: gaurav-nelson/github-action-markdown-link-check@v1 | |
with: | |
config-file: .github/workflows/markdown-link-check-config.json | |
- name: Inform Slack users of link check failures | |
uses: tiloio/[email protected] | |
if: ${{ failure() && steps.extract_branch.outputs.branch == 'main' }} | |
with: | |
slack_web_hook_url: ${{ secrets.SLACK_WEBHOOK_BRIMLABS_DOCS }} | |
slack_json: | | |
{ | |
"username": "markdown-link-check", | |
"text": "Markdown link check failed: https://github.com/{{GITHUB_REPOSITORY}}/actions/runs/{{GITHUB_RUN_ID}}" | |
} |