Skip to content

Commit

Permalink
Merge pull request #149 from gaurav-nelson/step-output
Browse files Browse the repository at this point in the history
WIP: Added results as output parameters
  • Loading branch information
gaurav-nelson committed Mar 14, 2024
2 parents 0f074c8 + c541b5c commit 25b2c43
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
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
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 25b2c43

Please sign in to comment.