This commit is contained in:
@@ -50,7 +50,34 @@ jobs:
|
|||||||
echo "Unresolved merge markers detected" >&2
|
echo "Unresolved merge markers detected" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
# Checkout recreates only `origin`; restore the documented upstream
|
|
||||||
|
# MANAGED_FAST_PATH: documentation and this baseline workflow cannot
|
||||||
|
# affect the shipped runtime. Keep the required status check, but do
|
||||||
|
# not install toolchains or execute the full product suite.
|
||||||
|
if [[ -n "${GITHUB_BASE_REF:-}" ]]; then
|
||||||
|
git fetch --no-tags --depth=1 origin "${GITHUB_BASE_REF}"
|
||||||
|
managed_base="origin/${GITHUB_BASE_REF}"
|
||||||
|
git diff --check "${managed_base}..HEAD"
|
||||||
|
mapfile -t managed_changed_files < <(
|
||||||
|
git diff --name-only --diff-filter=ACMR "${managed_base}..HEAD"
|
||||||
|
)
|
||||||
|
managed_runtime_change=0
|
||||||
|
for managed_path in "${managed_changed_files[@]}"; do
|
||||||
|
case "${managed_path}" in
|
||||||
|
*.md|*.mdx|docs/*|.github/ISSUE_TEMPLATE/*|.gitea/ISSUE_TEMPLATE/*|.gitea/runner-scope.sh|.gitea/workflows/managed-validation.yml)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
managed_runtime_change=1
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
if [[ "${#managed_changed_files[@]}" -gt 0 && "${managed_runtime_change}" -eq 0 ]]; then
|
||||||
|
printf 'Managed validation fast path: %s non-runtime file(s); full product suite skipped.\n' \
|
||||||
|
"${#managed_changed_files[@]}"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
fi # Checkout recreates only `origin`; restore the documented upstream
|
||||||
# identity required by the fork-boundary guard. The pinned baseline
|
# identity required by the fork-boundary guard. The pinned baseline
|
||||||
# tag is already part of this repository, so no upstream fetch occurs.
|
# tag is already part of this repository, so no upstream fetch occurs.
|
||||||
git remote add upstream https://gitlab.com/CalcProgrammer1/OpenRGB.git
|
git remote add upstream https://gitlab.com/CalcProgrammer1/OpenRGB.git
|
||||||
|
|||||||
Reference in New Issue
Block a user