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: