diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 18ed6699..df4c87a9 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -121,6 +121,8 @@ jobs: needs: yaml-check runs-on: ubuntu-latest if: ${{needs.yaml-check.outputs.toggle_md_linter == 'yes'}} + container: + image: davidanson/markdownlint-cli2 steps: - name: Checkout files @@ -132,9 +134,8 @@ jobs: curl "https://github.com/DavidAnson/markdownlint-cli2/blob/af14a2e768b741b941255b4c6b875339b4acbb73/test/config-files/cfg/.markdownlint-cli2.jsonc" \ -o resources/.markdownlint-cli2.jsonc - npm install markdownlint-cli2 --global - - markdownlint-cli2 "**/*.md" "#node_modules" >> check_reports/markdown_lint_report.txt 2>&1 + docker run -w /myfolder -v $PWD:/myfolder davidanson/markdownlint-cli2:v0.17.1 "**/*.md" "#node_modules" \ + >> check_reports/markdown_lint_report.txt 2>&1 # Commit the rendered bookdown files - name: Commit markdown report to preview branch