Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added results as output parameters #149

Merged
merged 1 commit into from
Mar 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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