mirror of
https://github.com/mudler/LocalAI.git
synced 2026-11-03 19:14:56 -05:00
fix(ci): publish images after large mixed diffs (#13011)
Quiet grep exits on the first image-visible path. Under pipefail, echo can then fail with SIGPIPE and the gate incorrectly skips images. Consume the full path list without changing the exclusion rules. Test the actual workflow gate with disposable Git history, including large mixed diffs, and run the regression in the lightweight lint job. Assisted-by: nib:gpt-6.1-sol Signed-off-by: Ettore Di Giacinto <mudler@localai.io> Co-authored-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
1 parent
968c6651ae
commit
9bd5d0f915
3 files changed
+163
-1
No files matched your search
@@ -52,7 +52,8 @@
|
||||
files="$(git diff --name-only "${BEFORE}" "${AFTER}")"
|
||||
echo "changed files:"; echo "${files:-<none>}"
|
||||
[ -z "${files}" ] && emit true "empty diff: building every image"
|
||||
if echo "${files}" | grep -qvE '^(gallery/|docs/|examples/)|\.md$'; then
|
||||
# Consume every path so an early match cannot SIGPIPE echo under pipefail.
|
||||
if echo "${files}" | grep -vE '^(gallery/|docs/|examples/)|\.md$' >/dev/null; then
|
||||
emit true "push touches image-visible content: building"
|
||||
fi
|
||||
emit false "only gallery/docs/markdown changed: images identical, skipping"
|
||||
|
||||
@@ -125,6 +125,10 @@ jobs:
|
||||
- name: run CI script tests
|
||||
run: make test-ci-scripts
|
||||
|
||||
# Exercise the actual publication gate without building any images.
|
||||
- name: test image publication gate
|
||||
run: python3 .github/ci/test-image-publication-gate.py
|
||||
|
||||
# The shared python backend helpers (Options[] parsing, engine-arg
|
||||
# mapping, model reference resolution) are stdlib-only, so their tests
|
||||
# ride along here instead of waiting on a multi-GB backend image build.
|
||||
|
||||
Reference in new issue
Block a user