@@ -42,28 +42,50 @@ runs:
4242 shell : bash
4343
4444 - name : Run YAML Checker
45+ env :
46+ SKIP_URL_CHECK : ${{ inputs.skip-url-check }}
47+ SKIP_TEMPLATES : ${{ inputs.skip-templates }}
48+ IGNORE_URLS : ${{ inputs.ignore-urls }}
4549 run : |
4650 # necessary because dayamlchecker.check_questions_urls isn't a binary.
4751 source $(uv tool dir)/dayamlchecker/bin/activate
48- find . -name "*.yml" -path "*/questions/*" -print0 | xargs -0 python -m dayamlchecker
52+
53+ args=()
54+ if [ "$SKIP_URL_CHECK" = "true" ]; then
55+ args+=(--no-url-check)
56+ fi
57+
58+ if [ "$SKIP_TEMPLATES" = "true" ]; then
59+ args+=(--url-check-skip-templates)
60+ fi
61+
62+ if [ -n "$IGNORE_URLS" ]; then
63+ args+=(--url-check-ignore-urls "$IGNORE_URLS")
64+ fi
65+
66+ find . -name "*.yml" -path "*/questions/*" -print0 | xargs -0 python -m dayamlchecker "${args[@]}"
4967 shell : bash
5068
5169 - name : Check URLs in question/template files
70+ env :
71+ SKIP_URL_CHECK : ${{ inputs.skip-url-check }}
72+ SKIP_TEMPLATES : ${{ inputs.skip-templates }}
73+ IGNORE_URLS : ${{ inputs.ignore-urls }}
5274 run : |
5375 # necessary because dayamlchecker.check_questions_urls isn't a binary.
5476 source $(uv tool dir)/dayamlchecker/bin/activate
55- if [ "${{ inputs.skip-url-check }} " = "true" ]; then
77+ if [ "$SKIP_URL_CHECK " = "true" ]; then
5678 echo "Skipping URL checks"
5779 exit 0
5880 fi
5981
6082 args=()
61- if [ "${{ inputs.skip-templates }} " = "true" ]; then
83+ if [ "$SKIP_TEMPLATES " = "true" ]; then
6284 args+=(--skip-templates)
6385 fi
6486
65- if [ -n "${{ inputs.ignore-urls }} " ]; then
66- args+=(--ignore-urls "${{ inputs.ignore-urls }} ")
87+ if [ -n "$IGNORE_URLS " ]; then
88+ args+=(--ignore-urls "$IGNORE_URLS ")
6789 fi
6890
6991 output_file="$(mktemp)"
0 commit comments