From 1c631eb3d96c4ad79529a158d2a4710d03ef32f2 Mon Sep 17 00:00:00 2001 From: Brian Kroth Date: Thu, 10 Dec 2020 15:25:30 -0600 Subject: [PATCH 1/3] Fix find command quoting issues for multiple folders. Fixes #87 --- entrypoint.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index 3d123c2..74cd4a4 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -182,9 +182,9 @@ if [ "$CHECK_MODIFIED_FILES" = "yes" ]; then else if [ "$5" -ne -1 ]; then - FIND_CALL=('find' "${FOLDERS}" '-name' '*'"${FILE_EXTENSION}" '-not' '-path' './node_modules/*' '-maxdepth' "${MAX_DEPTH}" '-exec' 'markdown-link-check' '{}') + FIND_CALL=('find' ${FOLDERS} '-name' '*'"${FILE_EXTENSION}" '-not' '-path' './node_modules/*' '-maxdepth' "${MAX_DEPTH}" '-exec' 'markdown-link-check' '{}') else - FIND_CALL=('find' "${FOLDERS}" '-name' '*'"${FILE_EXTENSION}" '-not' '-path' './node_modules/*' '-exec' 'markdown-link-check' '{}') + FIND_CALL=('find' ${FOLDERS} '-name' '*'"${FILE_EXTENSION}" '-not' '-path' './node_modules/*' '-exec' 'markdown-link-check' '{}') fi add_options From 938be1a0a05ad9c4f69313249b715407480ed8eb Mon Sep 17 00:00:00 2001 From: Brian Kroth Date: Thu, 10 Dec 2020 15:31:03 -0600 Subject: [PATCH 2/3] add a test for multiple directories --- .github/workflows/push.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 703da8a..2455881 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -9,6 +9,15 @@ jobs: uses: ./ with: check-modified-files-only: 'yes' + markdown-link-check-folders: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - name: markdown-link-check + uses: ./ + with: + # Add a test to restrict the test to just dir1 and dir2, not dir3. + folder-path: './md/dir1, ./md/dir2' shellcheck: runs-on: [ubuntu-latest] steps: From 78e8afab7810bb54b8f5b1f5dd0e7d1bc1549e4f Mon Sep 17 00:00:00 2001 From: Brian Kroth Date: Thu, 10 Dec 2020 15:38:47 -0600 Subject: [PATCH 3/3] add some working test examples for multiple dirs --- .github/workflows/push.yml | 4 ++-- md/dir4/ok4.md | 6 ++++++ md/dir5/ok5.md | 6 ++++++ 3 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 md/dir4/ok4.md create mode 100644 md/dir5/ok5.md diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 2455881..c521305 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -16,8 +16,8 @@ jobs: - name: markdown-link-check uses: ./ with: - # Add a test to restrict the test to just dir1 and dir2, not dir3. - folder-path: './md/dir1, ./md/dir2' + # Add a test to restrict the test to just dir4 and dir5. + folder-path: './md/dir4, ./md/dir5' shellcheck: runs-on: [ubuntu-latest] steps: diff --git a/md/dir4/ok4.md b/md/dir4/ok4.md new file mode 100644 index 0000000..1a5b1ce --- /dev/null +++ b/md/dir4/ok4.md @@ -0,0 +1,6 @@ +# Ok4 + +## Test + +Go to [Ok5](../dir5/ok5.md#test) + diff --git a/md/dir5/ok5.md b/md/dir5/ok5.md new file mode 100644 index 0000000..58db19f --- /dev/null +++ b/md/dir5/ok5.md @@ -0,0 +1,6 @@ +# Ok5 + +## Test + +Go to [Ok4](../dir4/ok4.md#test) +