diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 90a7c33..44a5d9d 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -24,8 +24,5 @@ jobs: - name: Lint Bash scripts uses: ./quality/bash - - name: Lint Markdown files - uses: ./quality/markdown - - name: Prepare documentation assets uses: ./foss/prepare-ghpages diff --git a/quality/markdown/action.yaml b/quality/markdown/action.yaml deleted file mode 100644 index cf95fae..0000000 --- a/quality/markdown/action.yaml +++ /dev/null @@ -1,9 +0,0 @@ -name: "markdown-linter" -description: "Check structure for markdown file and enforce valid links" - -runs: - using: "composite" - steps: - - name: Lint Markdown files - shell: bash - run: ${{ github.action_path }}/markdown-linter.sh $GITHUB_WORKSPACE diff --git a/quality/markdown/markdown-linter.sh b/quality/markdown/markdown-linter.sh deleted file mode 100755 index fae88c0..0000000 --- a/quality/markdown/markdown-linter.sh +++ /dev/null @@ -1,56 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2024 Dotanuki Labs -# SPDX-License-Identifier: MIT - -# shellcheck disable=SC1091 - -set -eo pipefail - -readonly folder="$1" - -# https://github.com/igorshubovych/markdownlint-cli/pkgs/container/markdownlint-cli -readonly markdownlint="ghcr.io/igorshubovych/markdownlint-cli:v0.47.0" - -# https://hub.docker.com/r/lycheeverse/lychee/tags -readonly lychee="lycheeverse/lychee:0.22.0" - -require_docker_daemon() { - if (! docker stats --no-stream >/dev/null); then - echo "Docker is required for this execution" - echo - exit 1 - fi -} - -require_docker_image() { - local image_spec="$1" - echo "Pulling Docker image : $image_spec" - docker pull "$image_spec" >/dev/null 2>&1 -} - -lint_markdown() { - echo - echo "→ Linting markdown files (markdownlint)" - docker run --rm -v "$folder:/workdir" "$markdownlint" "**/*.md" -} - -check_broken_links() { - echo - echo "→ Checking broken links (lychee)" - docker run --rm -w /input -v "$folder:/input" "$lychee" "**/*.md" --exclude "github\.com" -} - -echo -echo "🔥 Linting Markdown files" -echo - -require_docker_daemon -require_docker_image "$markdownlint" -lint_markdown - -require_docker_image "$lychee" -check_broken_links - -echo -echo "✅ All good!" -echo