From 73b0863714d1b28c67e53e178cc7d6ae8860aa9b Mon Sep 17 00:00:00 2001 From: Gaurav Nelson Date: Sat, 6 Jun 2020 21:21:20 +1000 Subject: [PATCH] Fixes file-extension bug --- .github/workflows/push.yml | 5 ----- entrypoint.sh | 8 ++++++-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 4a38ea8..b815a55 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -2,10 +2,6 @@ on: [pull_request] name: PR Checks jobs: markdown-link-check: - strategy: - matrix: - file-extension: [.md, .markdown] - fail-fast: false runs-on: ubuntu-latest steps: - uses: actions/checkout@master @@ -13,7 +9,6 @@ jobs: uses: ./ with: use-quiet-mode: 'yes' - file-extension: ${{ matrix.file-extension }} folder-path: 'md' shellcheck: runs-on: [ubuntu-latest] diff --git a/entrypoint.sh b/entrypoint.sh index a46f027..109128f 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -18,7 +18,11 @@ FOLDER_PATH="$4" MAX_DEPTH="$5" CHECK_MODIFIED_FILES="$6" BASE_BRANCH="$7" -FILE_EXTENSION="$8" +if [ $8 -eq 0 ]; then + FILE_EXTENSION=".md" +else + FILE_EXTENSION="$8" +fi echo -e "${BLUE}USE_QUIET_MODE: $1${NC}" echo -e "${BLUE}USE_VERBOSE_MODE: $2${NC}" @@ -77,7 +81,7 @@ if [ "$CHECK_MODIFIED_FILES" = "yes" ]; then for i in "${FILE_ARRAY[@]}" do - if [ ${i: -3} = ".md" ]; then + if [ ${i: -3} = "${FILE_EXTENSION}" ]; then FIND_CALL+=("${i}") COMMAND="${FIND_CALL[@]}" $COMMAND &>> error.txt || true