diff --git a/.github/workflows/markdownlint.yml b/.github/workflows/markdownlint.yml index eaa9198e55b..8a4917553e4 100644 --- a/.github/workflows/markdownlint.yml +++ b/.github/workflows/markdownlint.yml @@ -1,10 +1,13 @@ name: Markdownlint +permissions: + contents: read + on: pull_request: paths: - "**/*.md" - - ".markdownlint.json" + - ".markdownlint.jsonc" - ".github/workflows/markdownlint.yml" - ".github/workflows/markdownlint-problem-matcher.json" - "!eng/**" @@ -13,13 +16,15 @@ jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v5 - name: Use Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v5 with: - node-version: '16' - - name: Run Markdownlint + node-version: 'lts/*' + - name: Install markdownlint-cli run: | echo "::add-matcher::.github/workflows/markdownlint-problem-matcher.json" - npm i -g markdownlint-cli - markdownlint "**/*.md" \ No newline at end of file + npm install --global --no-audit --no-fund markdownlint-cli@0.45.0 + - name: Run markdownlint + run: | + markdownlint --config ./.markdownlint.jsonc '**/*.md'