diff --git a/.github/workflows/build-check.yaml b/.github/workflows/build-check.yaml index 9d40f96a..d6ca3832 100644 --- a/.github/workflows/build-check.yaml +++ b/.github/workflows/build-check.yaml @@ -129,9 +129,6 @@ jobs: - name: Checkout Repo uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - name: install dependencies - run: npm install - - name: run markdown-link-check run: make markdown-link-check @@ -141,8 +138,5 @@ jobs: - name: Checkout Repo uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - name: install dependencies - run: npm install - - name: run markdownlint run: make markdownlint \ No newline at end of file diff --git a/.markdownlint.yaml b/.markdownlint.yaml index eb42d5b5..c211e179 100644 --- a/.markdownlint.yaml +++ b/.markdownlint.yaml @@ -11,4 +11,6 @@ no-duplicate-header: ol-prefix: style: ordered no-inline-html: false -fenced-code-language: false \ No newline at end of file +fenced-code-language: false +MD024: false +MD059: false diff --git a/Makefile b/Makefile index 75be19ad..d63457e7 100644 --- a/Makefile +++ b/Makefile @@ -20,6 +20,8 @@ all: gen-all markdown-link-check markdownlint .PHONY: gen-all gen-all: gen-cpp gen-csharp gen-go gen-java gen-kotlin gen-objc gen-openapi gen-php gen-python gen-ruby +DEPENDENCIES_DOCKERFILE=./dependencies.Dockerfile + OTEL_DOCKER_PROTOBUF ?= otel/build-protobuf:0.9.0 BUF_DOCKER ?= bufbuild/buf:1.7.0 @@ -168,21 +170,24 @@ breaking-change: ALL_DOCS := $(shell find . -type f -name '*.md' -not -path './.github/*' -not -path './node_modules/*' | sort) +LYCHEEIMAGE := $(shell awk '$$4=="lychee" {print $$2}' $(DEPENDENCIES_DOCKERFILE)) .PHONY: markdown-link-check markdown-link-check: docker run --rm \ --mount 'type=bind,source=$(PWD),target=/home/repo' \ - lycheeverse/lychee \ + $(LYCHEEIMAGE) \ --config home/repo/.lychee.toml \ --root-dir /home/repo \ -v \ home/repo +MARKDOWNLINTIMAGE := $(shell awk '$$4=="markdownlint" {print $$2}' $(DEPENDENCIES_DOCKERFILE)) .PHONY: markdownlint markdownlint: - @if ! npm ls markdownlint; then npm install; fi @for f in $(ALL_DOCS); do \ echo $$f; \ - npx --no -p markdownlint-cli markdownlint -c .markdownlint.yaml $$f \ - || exit 1; \ + docker run --rm \ + --mount 'type=bind,source=$(PWD),target=/workdir' \ + $(MARKDOWNLINTIMAGE) \ + --config .markdownlint.yaml $$f || exit 1; \ done diff --git a/dependencies.Dockerfile b/dependencies.Dockerfile new file mode 100644 index 00000000..49b34615 --- /dev/null +++ b/dependencies.Dockerfile @@ -0,0 +1,3 @@ +# This is a renovate-friendly source of Docker images. +FROM davidanson/markdownlint-cli2:v0.18.1@sha256:173cb697a255a8a985f2c6a83b4f7a8b3c98f4fb382c71c45f1c52e4d4fed63a AS markdownlint +FROM lycheeverse/lychee:sha-3a09227-alpine@sha256:5853bd7c283663a1200dbb15924a5047f8d4c50adfa7a4c212a94f04bbac831c AS lychee diff --git a/docs/specification.md b/docs/specification.md index 496ae1a3..519fe0af 100644 --- a/docs/specification.md +++ b/docs/specification.md @@ -1,3 +1,4 @@ +