Skip to content

Commit

Permalink
Merge pull request #47 from gaurav-nelson/file-ext-fix
Browse files Browse the repository at this point in the history
Fix file extension bug
  • Loading branch information
gaurav-nelson committed Jun 6, 2020
2 parents 1a12c4c + 73b0863 commit ee0afb2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/push.yml
Expand Up @@ -2,18 +2,13 @@ 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
- name: markdown-link-check
uses: ./
with:
use-quiet-mode: 'yes'
file-extension: ${{ matrix.file-extension }}
folder-path: 'md'
shellcheck:
runs-on: [ubuntu-latest]
Expand Down
8 changes: 6 additions & 2 deletions entrypoint.sh
Expand Up @@ -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}"
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit ee0afb2

Please sign in to comment.