mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-07-08 12:24:09 +00:00
CI: Fix Qt XML validator attempting to validate non-XML files
Explicitly check only for changes `.ui` files in forms subdirectory and pass only changed files with that suffix to validator.
This commit is contained in:
parent
b15fc60d63
commit
48b51ce3c4
7
.github/actions/qt-xml-validator/action.yaml
vendored
7
.github/actions/qt-xml-validator/action.yaml
vendored
|
@ -44,13 +44,14 @@ runs:
|
||||||
: Validate XML 💯
|
: Validate XML 💯
|
||||||
if [[ "${RUNNER_DEBUG}" ]]; then set -x; fi
|
if [[ "${RUNNER_DEBUG}" ]]; then set -x; fi
|
||||||
shopt -s extglob
|
shopt -s extglob
|
||||||
|
shopt -s globstar
|
||||||
|
|
||||||
changes=($(git diff --name-only HEAD~1 HEAD -- UI/forms))
|
changes=($(git diff --name-only HEAD~1 HEAD -- UI/forms/**/*.ui))
|
||||||
case "${GITHUB_EVENT_NAME}" in
|
case "${GITHUB_EVENT_NAME}" in
|
||||||
pull_request) changes=($(git diff --name-only origin/"${GITHUB_BASE_REF}" HEAD -- UI/forms)) ;;
|
pull_request) changes=($(git diff --name-only origin/"${GITHUB_BASE_REF}" HEAD -- UI/forms/**/*.ui)) ;;
|
||||||
push)
|
push)
|
||||||
if [[ "${GITHUB_EVENT_FORCED}" == false ]]; then
|
if [[ "${GITHUB_EVENT_FORCED}" == false ]]; then
|
||||||
changes=($(git diff --name-only ${GITHUB_REF_BEFORE} HEAD -- UI/forms))
|
changes=($(git diff --name-only ${GITHUB_REF_BEFORE} HEAD -- UI/forms/**/*.ui))
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
*) ;;
|
*) ;;
|
||||||
|
|
Loading…
Reference in a new issue