diff --git a/link-verifier/action.yml b/link-verifier/action.yml index 3c20f1e0..71dd80ee 100644 --- a/link-verifier/action.yml +++ b/link-verifier/action.yml @@ -72,28 +72,31 @@ runs: bashInfo: \033[33;1mINFO - bashFail: \033[31;1mFAILED - bashEnd: \033[0m - stepName: Run link verifier script + stepName: Check Links in Files name: ${{ env.stepName }} working-directory: ${{ inputs.path }} shell: bash run: | # ${{ env.stepName }} - echo -e "::group::${{ env.stepName }}" + echo -e "::group::${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}" args="--test-markdown" if [ -n "${{ inputs.exclude-dirs }}" ]; then dirs="${{ inputs.exclude-dirs }}" dirs="${dirs//,/ }" args+=" --exclude-dirs ${dirs}" fi + if [ -n "${{ inputs.include-file-types }}" ]; then file_types="${{ inputs.include-file-types }}" file_types="${file_types//,/ }" args+=" --include-file-types ${file_types}" fi + if [ -n "${{ inputs.allowlist-file }}" ]; then touch allowList.txt cat ${{ inputs.allowlist-file }} >> allowList.txt fi + if [[ "${{ inputs.exclude-urls }}" != "" ]]; then touch allowList.txt exclude_urls="${{ inputs.exclude-urls }}" @@ -105,11 +108,12 @@ runs: args+=" --allowlist-file allowList.txt" fi - echo -e "${{ env.bashInfo }} Running verify-links.py ${args} --user-agent \"${{ inputs.user-agent }}\" ${{ env.bashEnd }}" + echo -e "${{ env.bashInfo }} Running: verify-links.py ${args} --user-agent \"${{ inputs.user-agent }}\" ${{ env.bashEnd }}" set +e python3 ${GITHUB_ACTION_PATH}/verify-links.py ${args} --user-agent "${{ inputs.user-agent }}"; exitStatus=$? set -e + echo -e "::endgroup::" # We check the backwards condition for this one if [ $exitStatus -eq 1 ]; then