Merge pull request #47 from gaurav-nelson/file-ext-fix

Fix file extension bug
This commit is contained in:
Gaurav Nelson 2020-06-06 21:23:30 +10:00 committed by GitHub
commit ee0afb2ca1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 7 deletions

View File

@ -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]

View File

@ -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