{"id":13910986,"url":"https://github.com/ruzickap/action-my-markdown-link-checker","last_synced_at":"2025-03-17T08:37:43.680Z","repository":{"id":37528176,"uuid":"280585524","full_name":"ruzickap/action-my-markdown-link-checker","owner":"ruzickap","description":"A GitHub Action for checking broken links in Markdown files","archived":false,"fork":false,"pushed_at":"2025-03-16T02:22:35.000Z","size":229,"stargazers_count":18,"open_issues_count":1,"forks_count":7,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-16T03:23:46.820Z","etag":null,"topics":["actions","broken-links","checker","github-action","github-actions","link-checker","link-checking","links","markdown","public","url-checker","url-checking","website"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ruzickap.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-07-18T05:02:16.000Z","updated_at":"2025-03-16T02:22:05.000Z","dependencies_parsed_at":"2023-12-21T15:21:32.528Z","dependency_job_id":"37e067eb-d8e6-4127-9288-54d5602e545d","html_url":"https://github.com/ruzickap/action-my-markdown-link-checker","commit_stats":{"total_commits":108,"total_committers":5,"mean_commits":21.6,"dds":"0.41666666666666663","last_synced_commit":"acfce7401c74226d42b2ff84fbb517e609e54d10"},"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruzickap%2Faction-my-markdown-link-checker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruzickap%2Faction-my-markdown-link-checker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruzickap%2Faction-my-markdown-link-checker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruzickap%2Faction-my-markdown-link-checker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ruzickap","download_url":"https://codeload.github.com/ruzickap/action-my-markdown-link-checker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243852499,"owners_count":20358271,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["actions","broken-links","checker","github-action","github-actions","link-checker","link-checking","links","markdown","public","url-checker","url-checking","website"],"created_at":"2024-08-07T00:01:53.120Z","updated_at":"2025-03-17T08:37:43.380Z","avatar_url":"https://github.com/ruzickap.png","language":"Shell","funding_links":[],"categories":["Shell"],"sub_categories":[],"readme":"# GitHub Actions: My Markdown Link Checker ✔\n\n[![GitHub Marketplace](https://img.shields.io/badge/Marketplace-My%20Markdown%20Link%20Checker-blue.svg?colorA=24292e\u0026colorB=0366d6\u0026style=flat\u0026longCache=true\u0026logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAM6wAADOsB5dZE0gAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAERSURBVCiRhZG/SsMxFEZPfsVJ61jbxaF0cRQRcRJ9hlYn30IHN/+9iquDCOIsblIrOjqKgy5aKoJQj4O3EEtbPwhJbr6Te28CmdSKeqzeqr0YbfVIrTBKakvtOl5dtTkK+v4HfA9PEyBFCY9AGVgCBLaBp1jPAyfAJ/AAdIEG0dNAiyP7+K1qIfMdonZic6+WJoBJvQlvuwDqcXadUuqPA1NKAlexbRTAIMvMOCjTbMwl1LtI/6KWJ5Q6rT6Ht1MA58AX8Apcqqt5r2qhrgAXQC3CZ6i1+KMd9TRu3MvA3aH/fFPnBodb6oe6HM8+lYHrGdRXW8M9bMZtPXUji69lmf5Cmamq7quNLFZXD9Rq7v0Bpc1o/tp0fisAAAAASUVORK5CYII=)](https://github.com/marketplace/actions/my-markdown-link-checker)\n[![license](https://img.shields.io/github/license/ruzickap/action-my-markdown-link-checker.svg)](https://github.com/ruzickap/action-my-markdown-link-checker/blob/main/LICENSE)\n[![release](https://img.shields.io/github/release/ruzickap/action-my-markdown-link-checker.svg)](https://github.com/ruzickap/action-my-markdown-link-checker/releases/latest)\n[![GitHub release date](https://img.shields.io/github/release-date/ruzickap/action-my-markdown-link-checker.svg)](https://github.com/ruzickap/action-my-markdown-link-checker/releases)\n![GitHub Actions status](https://github.com/ruzickap/action-my-markdown-link-checker/workflows/docker-image/badge.svg)\n[![Docker Hub Build Status](https://img.shields.io/docker/cloud/build/peru/my-markdown-link-checker.svg)](https://hub.docker.com/r/peru/my-markdown-link-checker)\n\nThis is a GitHub Action to check Markdown files for broken links.\nIt's using the [markdown-link-check](https://github.com/tcort/markdown-link-check)\nand [fd](https://github.com/sharkdp/fd).\n\nSee the basic GitHub Action example:\n\n```yaml\nname: markdown-link-check\n\non:\n  push:\n\njobs:\n  markdown-link-check:\n    name: Check markdown files\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v4\n\n      - name: Markdown links check\n        uses: ruzickap/action-my-markdown-link-checker@v1\n```\n\n## Parameters\n\nVariables used by `action-my-markdown-link-checker` GitHub Action:\n\n| Variable        | Default                                             | Description                                                                                                                                                                        |\n|-----------------|-----------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `config_file`   | `.mlc_config.json` (if exists)                      | [Config file](https://github.com/tcort/markdown-link-check#config-file-format) used by [markdown-link-check](https://github.com/tcort/markdown-link-check)                         |\n| `debug`         | (not defined)                                       | Enable debug mode for the [entrypoint.sh](entrypoint.sh) script (`set -x`) and `--verbose` for [markdown-link-check](https://github.com/tcort/markdown-link-check)                 |\n| `exclude`       | (not defined)                                       | Exclude files or directories - see the [--exclude parameter](https://github.com/sharkdp/fd#excluding-specific-files-or-directories) of [fd](https://github.com/sharkdp/fd) command |\n| `fd_cmd_params` | `. -0 --extension md --type f --hidden --no-ignore` | Set your own parameters for [fd](https://github.com/sharkdp/fd) command. `exclude` and `search_paths` parameters are ignored if this is set.                                       |\n| `quiet`         | (not defined)                                       | Display errors only                                                                                                                                                                |\n| `search_paths`  | (not defined)                                       | By default all `*.md` are checked in whole repository, but you can specify directories                                                                                             |\n| `verbose`       | (not defined)                                       | Displays detailed error information                                                                                                                                                |\n\nNone of the parameters above are \"mandatory\".\n\nIn case you need to exclude/ignore some domains, add headers, form being checked\nyou need to use the [config_file](https://github.com/tcort/markdown-link-check#config-file-format)\nfor [markdown-link-check](https://github.com/tcort/markdown-link-check).\n\nIf `.mlc_config.json` is found in the root of the repository it's automatically\nused as `config_file`.\n\n## Full example\n\nGitHub Action example:\n\n```yaml\nname: markdown-link-check\n\non:\n  push:\n    branches:\n      - main\n\njobs:\n  markdown-link-check:\n  name: Check markdown files for broken links\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v4\n\n      - name: Markdown links check\n        uses: ruzickap/action-my-markdown-link-checker@v1\n        with:\n          config_file: mlc_config.json\n          debug: true\n          exclude: |\n            my_exclude_dir/md_files/\n            my_exclude_dir_2/markdown_files/\n            CHANGELOG.md\n          search_paths: |\n            check_dir_1/md_files/\n            check_dir_2/markdown_files/\n\n      - name: Markdown links check - check only 'docs' directory and exclude CHANGELOG.md\n        uses: ruzickap/action-my-markdown-link-checker@v1\n        with:\n          search_paths: |\n            docs/\n          exclude: |\n            CHANGELOG.md\n          verbose: true\n\n      - name: Markdown links check - simple example\n        uses: ruzickap/action-my-markdown-link-checker@v1\n\n      - name: Markdown links check using pre-built container\n        uses: docker://peru/my-markdown-link-checker@v1\n```\n\nExample with periodic runs (run as Cron):\n\n```yaml\nname: periodic-markdown-link-check\n\non:\n  schedule:\n    - cron: '8 8 * * 2'\n\njobs:\n  markdown-link-check:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v4\n\n      - name: Markdown links check\n        uses: ruzickap/action-my-markdown-link-checker@v1\n```\n\n## Running locally\n\nIt's possible to use the Markdown link checks locally using docker:\n\n```bash\ndocker run --rm -t -v \"${PWD}/tests/test2:/mnt\" peru/my-markdown-link-checker\n```\n\nOutput:\n\n```text\n*** Start checking...\n*** Running: fd . -0 --extension md --type f --hidden --no-ignore\n*** Running: markdown-link-check  normal.md\n\nFILE: normal.md\n[✓] https://google.com\n\n1 links checked.\n\n\n*** Checks completed...\n```\n\nOr you can also use parameters:\n\n```bash\nexport INPUT_EXCLUDE=\"CHANGELOG.md test1/excluded_file.md bad.md excluded_dir/\"\nexport INPUT_SEARCH_PATHS=\"tests/\"\nexport INPUT_VERBOSE=\"true\"\ndocker run --rm -t -e INPUT_EXCLUDE -e INPUT_SEARCH_PATHS -e INPUT_VERBOSE -v \"${PWD}:/mnt\" peru/my-markdown-link-checker\n```\n\nOutput:\n\n```text\n*** Start checking...\n*** Running: fd . -0 --extension md --type f --hidden --no-ignore --exclude CHANGELOG.md --exclude test1/excluded_file.md --exclude bad.md --exclude excluded_dir/ tests/\n*** Running: markdown-link-check --verbose tests/test2/normal.md\n\nFILE: tests/test2/normal.md\n[✓] https://google.com → Status: 200\n\n1 links checked.\n\n\n*** Checks completed...\n```\n\nThe example with broken links may look like:\n\n```shell\ndocker run --rm -t -e INPUT_SEARCH_PATHS -e INPUT_VERBOSE -v \"${PWD}:/mnt\" peru/my-markdown-link-checker\n```\n\nOutput:\n\n```text\n*** Start checking...\n*** Running: fd . -0 --extension md --type f --hidden --no-ignore tests/\n*** Running: markdown-link-check --verbose tests/excluded_dir/excluded.md\n\nFILE: tests/excluded_dir/excluded.md\n[✓] https://google.com → Status: 200\n\n1 links checked.\n\n\n*** Running: markdown-link-check --verbose tests/test-bad-mdfile/bad.md\n\nFILE: tests/test-bad-mdfile/bad.md\n[✖] https://non-existing-domain.com → Status: 0 Error: getaddrinfo ENOTFOUND non-existing-domain.com\n    at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:66:26) {\n  errno: -3008,\n  code: 'ENOTFOUND',\n  syscall: 'getaddrinfo',\n  hostname: 'non-existing-domain.com'\n}\n\n1 links checked.\n\nERROR: 1 dead links found!\n[✖] https://non-existing-domain.com → Status: 0\n*** ERROR: Something went wrong - see the errors above...\n```\n\nDemo:\n\n[![My Markdown Link Checker](https://asciinema.org/a/348733.svg)](https://asciinema.org/a/348733)\n\n## Similar projects\n\n* [https://github.com/gaurav-nelson/github-action-markdown-link-check](https://github.com/gaurav-nelson/github-action-markdown-link-check)\n  * great project with missing \"exclude/skip files\" functionality (as of now 2020-07-20)\n* [https://github.com/ocular-d/md-linkcheck-action](https://github.com/ocular-d/md-linkcheck-action)\n  * similar project with not enough advanced features\n* [https://github.com/peter-evans/link-checker](https://github.com/peter-evans/link-checker)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruzickap%2Faction-my-markdown-link-checker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fruzickap%2Faction-my-markdown-link-checker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruzickap%2Faction-my-markdown-link-checker/lists"}