From da6ca6edaf667e456e342bace834575ecd42df69 Mon Sep 17 00:00:00 2001 From: qiancai Date: Wed, 6 May 2026 10:04:25 +0800 Subject: [PATCH] fix manual cloud translation cursor updates --- .github/workflows/translation-zh.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/translation-zh.yaml b/.github/workflows/translation-zh.yaml index 0998121516fb1..0fac64b2e28ec 100644 --- a/.github/workflows/translation-zh.yaml +++ b/.github/workflows/translation-zh.yaml @@ -184,7 +184,12 @@ jobs: exit 0 fi - python -c 'import json, os; from pathlib import Path; Path("latest_translation_commit.json").write_text(json.dumps({"target": os.environ["SOURCE_BRANCH"], "sha": os.environ["HEAD_REF"]}, ensure_ascii=False, indent=2) + "\n", encoding="utf-8")' + if [ "${GITHUB_EVENT_NAME}" = "schedule" ]; then + python -c 'import json, os; from pathlib import Path; Path("latest_translation_commit.json").write_text(json.dumps({"target": os.environ["SOURCE_BRANCH"], "sha": os.environ["HEAD_REF"]}, ensure_ascii=False, indent=2) + "\n", encoding="utf-8")' + else + echo "Skipping latest_translation_commit.json update for ${GITHUB_EVENT_NAME} run." + fi + echo "has_changes=true" >> "${GITHUB_OUTPUT}" - name: Set build metadata