This is an automated email from the ASF dual-hosted git repository.
robinv8 pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/answer-plugins.git
The following commit(s) were added to refs/heads/dev by this push:
new a92c394 ci: run sync-info only on dev and keep i18n order stable
(#332)
a92c394 is described below
commit a92c394532b8969dd081f54c7eed50a92e983f48
Author: Robin <[email protected]>
AuthorDate: Thu Oct 22 15:46:31 2026 +0800
ci: run sync-info only on dev and keep i18n order stable (#332)
The Sync Plugin Info workflow ran on pushes to both `dev` and `main`
while always using the same `chore/sync-info` branch. A `dev` run
force-pushed that branch onto `dev`, so the `main` sync PR (#330)
suddenly showed the whole LDAP connector, and two bot PRs (#330, #331)
shared one branch. Separately, `sync-info.sh` iterated i18n files in
unsorted `find` order, so `zh_CN`/`en_US` could swap between runs and
produce large reorder-only diffs.
Changes:
- Trigger only on pushes to `dev` (changes reach `main` via dev); set
`base: dev` explicitly and `delete-branch: true`.
- Add a `concurrency` group so back-to-back pushes don't race on the
branch.
- Sort i18n files with `LC_ALL=C sort` so key order is deterministic
(`en_US`, then `zh_CN`, matching the current file).
Tested locally on `dev`: the regenerated `plugins_desc.json` only adds
the new LDAP and vector-search entries (+65/−0), with no reordering, and
two runs are byte-identical.
Co-authored-by: robinv8 <[email protected]>
---
.github/workflows/sync-info.yml | 8 +++++++-
script/sync-info.sh | 2 +-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/sync-info.yml b/.github/workflows/sync-info.yml
index 1bd3da6..2b2fa9f 100644
--- a/.github/workflows/sync-info.yml
+++ b/.github/workflows/sync-info.yml
@@ -18,7 +18,11 @@
name: Sync info
on:
push:
- branches: [dev, main]
+ branches: [dev]
+
+concurrency:
+ group: sync-info
+ cancel-in-progress: true
jobs:
build:
@@ -38,3 +42,5 @@ jobs:
title: "chore: Sync Plugin Info"
body: "Sync Plugin Info"
branch: "chore/sync-info"
+ base: dev
+ delete-branch: true
diff --git a/script/sync-info.sh b/script/sync-info.sh
index aa36cc4..5a5abfc 100755
--- a/script/sync-info.sh
+++ b/script/sync-info.sh
@@ -55,7 +55,7 @@ for plugin in "${plugins[@]}"; do
fi
if [ -d "$dir/i18n" ]; then
- for file in $(find "$dir/i18n" -type f -name "*.yaml"); do
+ for file in $(find "$dir/i18n" -type f -name "*.yaml" | LC_ALL=C
sort); do
if [ -f "$file" ]; then
file_name=$(basename "$file")
file_name=${file_name%.*}