Skip to content

Commit 9aa60da

Browse files
StuBehanclaude
andauthored
fix(ci): filter Kokoro release check to releases with general assets (#26)
The original tag-name-only filter shipped in #24 would have flagged `model-files-v1.1` as an upgrade candidate even though that release ships only a Mandarin variant (`kokoro-v1.1-zh.onnx` / `voices-v1.1-zh.bin`). Bumping engine.py URLs to it would silently swap the multilingual model for a Chinese-focused one. Tightens the jq filter to require both `kokoro-vX.Y.onnx` and `voices-vX.Y.bin` assets to be present in the release before treating it as a successor. With this in place the workflow currently resolves `model-files-v1.0` (== pinned) and reports up-to-date, as it should. A future general release (with non-suffixed asset names) will surface correctly. This was meant to land as a follow-up commit on #24 but the squash merge captured only the first commit on that branch. Filing as its own PR. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent f62c91b commit 9aa60da

1 file changed

Lines changed: 22 additions & 6 deletions

File tree

.github/workflows/check-kokoro-model.yml

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,33 @@ jobs:
4646
env:
4747
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4848
run: |
49-
# Filter to model-files-v* tags so the kokoro_onnx Python package
50-
# releases (which use plain v* tags) don't confuse us.
51-
tag=$(gh api repos/thewh1teagle/kokoro-onnx/releases \
52-
--jq '[.[] | select(.tag_name | startswith("model-files-v"))][0].tag_name')
49+
# Two filters here, both essential:
50+
#
51+
# 1. tag_name starts with `model-files-v` — kokoro-onnx also
52+
# publishes plain `v*` tags for the Python package; we don't
53+
# care about those.
54+
#
55+
# 2. release contains BOTH `kokoro-vX.Y.onnx` AND `voices-vX.Y.bin`
56+
# assets (no variant suffix). This skips Mandarin-only sibling
57+
# releases like `model-files-v1.1` whose assets are
58+
# `kokoro-v1.1-zh.onnx` / `voices-v1.1-zh.bin` — a tag-only
59+
# check would treat that as a successor and prompt a broken
60+
# URL bump.
61+
tag=$(gh api repos/thewh1teagle/kokoro-onnx/releases --jq '
62+
[
63+
.[]
64+
| select(.tag_name | startswith("model-files-v"))
65+
| select([.assets[] | .name | test("^kokoro-v[0-9.]+\\.onnx$")] | any)
66+
| select([.assets[] | .name | test("^voices-v[0-9.]+\\.bin$")] | any)
67+
][0].tag_name
68+
')
5369
if [ -z "$tag" ] || [ "$tag" = "null" ]; then
54-
echo "::warning::could not resolve latest upstream model-files-v* tag; skipping"
70+
echo "::warning::could not resolve latest upstream model-files-v* tag with general (non-variant) assets; skipping"
5571
echo "tag=" >> "$GITHUB_OUTPUT"
5672
exit 0
5773
fi
5874
echo "tag=$tag" >> "$GITHUB_OUTPUT"
59-
echo "latest upstream tag: $tag"
75+
echo "latest upstream tag (with general assets): $tag"
6076
6177
- name: ensure model-upgrade label exists
6278
if: steps.latest.outputs.tag != '' && steps.latest.outputs.tag != steps.pinned.outputs.tag

0 commit comments

Comments
 (0)