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 <robinv8@users.noreply.github.com>
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 @@ 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 @@ 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%.*}