43
43
shell : bash
44
44
run : |
45
45
# ${{ env.stepName }}
46
- echo -e "::group::${{ env.stepName }}"
46
+ echo -e "::group::${{ env.bashInfo }} ${{ env. stepName }} ${{ env.bashEnd }}"
47
47
48
48
wget https://github.com/jgm/pandoc/releases/download/2.11/pandoc-2.11-1-amd64.deb -O pandoc.deb
49
49
sudo dpkg -i pandoc.deb
@@ -72,28 +72,31 @@ runs:
72
72
bashInfo : \033[33;1mINFO -
73
73
bashFail : \033[31;1mFAILED -
74
74
bashEnd : \033[0m
75
- stepName : Run link verifier script
75
+ stepName : Check Links in Files
76
76
name : ${{ env.stepName }}
77
77
working-directory : ${{ inputs.path }}
78
78
shell : bash
79
79
run : |
80
80
# ${{ env.stepName }}
81
- echo -e "::group::${{ env.stepName }}"
81
+ echo -e "::group::${{ env.bashInfo }} ${{ env. stepName }} ${{ env.bashEnd }}"
82
82
args="--test-markdown"
83
83
if [ -n "${{ inputs.exclude-dirs }}" ]; then
84
84
dirs="${{ inputs.exclude-dirs }}"
85
85
dirs="${dirs//,/ }"
86
86
args+=" --exclude-dirs ${dirs}"
87
87
fi
88
+
88
89
if [ -n "${{ inputs.include-file-types }}" ]; then
89
90
file_types="${{ inputs.include-file-types }}"
90
91
file_types="${file_types//,/ }"
91
92
args+=" --include-file-types ${file_types}"
92
93
fi
94
+
93
95
if [ -n "${{ inputs.allowlist-file }}" ]; then
94
96
touch allowList.txt
95
97
cat ${{ inputs.allowlist-file }} >> allowList.txt
96
98
fi
99
+
97
100
if [[ "${{ inputs.exclude-urls }}" != "" ]]; then
98
101
touch allowList.txt
99
102
exclude_urls="${{ inputs.exclude-urls }}"
@@ -105,13 +108,13 @@ runs:
105
108
args+=" --allowlist-file allowList.txt"
106
109
fi
107
110
108
- echo -e "${{ env.bashInfo }} Running verify-links.py ${args} --user-agent \"${{ inputs.user-agent }}\" ${{ env.bashEnd }}"
111
+ echo -e "${{ env.bashInfo }} Running: verify-links.py ${args} --user-agent \"${{ inputs.user-agent }}\" ${{ env.bashEnd }}"
109
112
set +e
110
113
python3 ${GITHUB_ACTION_PATH}/verify-links.py ${args} --user-agent "${{ inputs.user-agent }}";
111
114
exitStatus=$?
112
115
set -e
116
+
113
117
echo -e "::endgroup::"
114
- # We check the backwards condition for this one
115
118
if [ $exitStatus -eq 1 ]; then
116
119
echo -e "${{ env.bashFail }} ${{ env.stepName }} ${{ env.bashEnd }}"
117
120
else
0 commit comments