Skip to content

Commit

Permalink
Added results as output parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaurav Nelson authored and gaurav-nelson committed Mar 14, 2024
1 parent 0f074c8 commit c541b5c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ jobs:
uses: ./
with:
check-modified-files-only: 'yes'
id: markdown-link-check
- name: display errors
run: |
echo "${{ steps.markdown-link-check.outputs.MLC_OUTPUT }}"
markdown-link-check-folders:
runs-on: ubuntu-latest
steps:
Expand Down
6 changes: 6 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ FOLDER_PATH="$4"
MAX_DEPTH="$5"
CHECK_MODIFIED_FILES="$6"
BASE_BRANCH="$7"

if [ -z "$8" ]; then
FILE_EXTENSION=".md"
else
Expand Down Expand Up @@ -94,16 +95,21 @@ check_errors () {
cat error.txt
printf "\n"
echo -e "${YELLOW}=========================================================================${NC}"
echo "MLC_OUTPUT<<EOF" >> "$GITHUB_ENV"
cat error.txt >> "$GITHUB_ENV"
echo "EOF" >> "$GITHUB_ENV"
exit 113
else
echo -e "${YELLOW}=========================> MARKDOWN LINK CHECK <=========================${NC}"
printf "\n"
echo -e "${GREEN}[✔] All links are good!${NC}"
printf "\n"
echo -e "${YELLOW}=========================================================================${NC}"
echo "MLC_OUTPUT=[✔] All links are good!" >> "$GITHUB_OUTPUT"
fi
else
echo -e "${GREEN}All good!${NC}"
echo "MLC_OUTPUT=All good!" >> "$GITHUB_OUTPUT"
fi

}
Expand Down

0 comments on commit c541b5c

Please sign in to comment.