diff --git a/.github/workflows/markdown-lint.yml b/.github/workflows/markdown-lint.yml index ce9b4fac8..cd4a58371 100644 --- a/.github/workflows/markdown-lint.yml +++ b/.github/workflows/markdown-lint.yml @@ -18,11 +18,9 @@ jobs: - name: Get changed files id: changed_files run: | - git diff --name-only -r HEAD^1 HEAD | while read -r file; do - echo "*/${file}" - done + echo "::set-output name=files::$(git show --pretty="" --name-only ${{ github.sha }} | grep '\.md$' | tr '\n' ',' | sed 's/,$//')" - name: Markdown Linter uses: DavidAnson/markdownlint-cli2-action@v15 with: - files: ${{ steps.changed_files.outputs.stdout }} + globs: ${{ steps.changed_files.outputs.files }}