Check Markdown Links #46
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
# GitHub Action from: https://github.com/gaurav-nelson/github-action-markdown-link-check | |
# Uses code from: https://github.com/tcort/markdown-link-check | |
# Be sure to also create a file named "mlc_config.json" with the following contents: | |
# { | |
# "aliveStatusCodes": [429, 403, 200] | |
# } | |
name: Check Markdown Links | |
on: | |
push: | |
schedule: | |
# Modify the cron time to a somewhat random day/time to avoid having all your repos running at the same time | |
# Run 4th day of every month at 4:32 AM (See https://pubs.opengroup.org/onlinepubs/9699919799/utilities/crontab.html#tag_20_25_07) | |
- cron: "32 4 4 * *" | |
workflow_dispatch: | |
inputs: | |
message: | |
description: Message to display in job summary | |
required: false | |
type: string | |
workflow_call: | |
inputs: | |
message: | |
description: Message to display in job summary | |
required: false | |
type: string | |
jobs: | |
markdown-link-check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: gaurav-nelson/github-action-markdown-link-check@v1 | |
with: | |
base-branch: main | |
use-verbose-mode: yes | |
# config file is used to flag several HTTP result codes as a valid "alive" results | |
config-file: './.github/workflows/mlc_config.json' | |
- name: Print the job summary | |
if: ${{ inputs.message }} | |
run: | | |
echo ${{ inputs.message }} >$GITHUB_STEP_SUMMARY |