From dd27b9acc1bb1927aeb5ce4f71845d721cf5999a Mon Sep 17 00:00:00 2001 From: Dirk Klimpel <5740567+dklimpel@users.noreply.github.com> Date: Tue, 26 Mar 2024 08:22:20 +0100 Subject: [PATCH] docs: add example for GitLab pipeline --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index 3971780..e7b2a92 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,21 @@ To run as a [pre-commit hook](https://pre-commit.com): args: [-q] ``` +## Run in a GitLab pipeline + +```yaml +linkchecker: + stage: test + image: + name: ghcr.io/tcort/markdown-link-check:3.11.2 + entrypoint: ["/bin/sh", "-c"] + script: + - find . -name \*.md -print0 | xargs -0 -n1 markdown-link-check + rules: + - changes: + - "**/*.md" +``` + ## Run in other tools - [Mega-Linter](https://megalinter.io/latest/): Linters aggregator [including markdown-link-check](https://megalinter.io/latest/descriptors/markdown_markdown_link_check/)