From 21ae9982d9ed6908fc270e21ce334abfea62f5f6 Mon Sep 17 00:00:00 2001 From: icarus Date: Thu, 4 Sep 2025 18:06:10 +0800 Subject: [PATCH] =?UTF-8?q?ci(workflow):=20=E4=BF=AE=E6=94=B9=E8=87=AA?= =?UTF-8?q?=E5=8A=A8i18n=E5=B7=A5=E4=BD=9C=E6=B5=81=E8=A7=A6=E5=8F=91?= =?UTF-8?q?=E6=9D=A1=E4=BB=B6=E4=B8=BApull=5Frequest?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将触发条件从push到main分支改为在pull_request的opened、synchronize和reopened事件时触发 --- .github/workflows/auto-i18n.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/auto-i18n.yml b/.github/workflows/auto-i18n.yml index 83781353ed..c9adf13375 100644 --- a/.github/workflows/auto-i18n.yml +++ b/.github/workflows/auto-i18n.yml @@ -6,8 +6,8 @@ env: BASE_URL: ${{ vars.BASE_URL || 'https://api.ppinfra.com/openai'}} on: - push: - branches: [main] + pull_request: + types: [opened, synchronize, reopened] workflow_dispatch: jobs: @@ -32,6 +32,13 @@ jobs: - name: 🏃‍♀️ Translate run: tsx scripts/update-i18n.ts + - name: 🔄 Commit changes + run: | + git config --local user.email "action@github.com" + git config --local user.name "GitHub Action" + git add . + git commit -m "fix: Auto update i18n locales from GitHub Actions" + - name: 🚀 Push changes uses: ad-m/git-push@v1 with: