mirror of
https://github.com/gaurav-nelson/github-action-markdown-link-check.git
synced 2024-09-11 19:27:21 +03:00
Merge pull request #47 from gaurav-nelson/file-ext-fix
Fix file extension bug
This commit is contained in:
commit
ee0afb2ca1
5
.github/workflows/push.yml
vendored
5
.github/workflows/push.yml
vendored
@ -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]
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user