ci(workflow): 修改自动i18n工作流触发条件为pull_request

将触发条件从push到main分支改为在pull_request的opened、synchronize和reopened事件时触发
This commit is contained in:
icarus 2025-09-04 18:06:10 +08:00
parent 8fbfc3eecd
commit 21ae9982d9

View File

@ -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: