From c95761f4e6234a27a31446bec768da72826d3324 Mon Sep 17 00:00:00 2001 From: lyzno1 <92089059+lyzno1@users.noreply.github.com> Date: Wed, 6 Aug 2025 15:59:26 +0800 Subject: [PATCH] fix: resolve i18n workflow permissions and naming issues (#23494) --- .github/workflows/translate-i18n-base-on-english.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/translate-i18n-base-on-english.yml b/.github/workflows/translate-i18n-base-on-english.yml index c79d58563..1cb9c0967 100644 --- a/.github/workflows/translate-i18n-base-on-english.yml +++ b/.github/workflows/translate-i18n-base-on-english.yml @@ -5,6 +5,10 @@ on: types: [closed] branches: [main] +permissions: + contents: write + pull-requests: write + jobs: check-and-update: if: github.event.pull_request.merged == true @@ -16,7 +20,7 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 2 # last 2 commits - persist-credentials: false + token: ${{ secrets.GITHUB_TOKEN }} - name: Check for file changes in i18n/en-US id: check_files @@ -49,7 +53,7 @@ jobs: if: env.FILES_CHANGED == 'true' run: pnpm install --frozen-lockfile - - name: Run npm script + - name: Generate i18n translations if: env.FILES_CHANGED == 'true' run: pnpm run auto-gen-i18n @@ -57,6 +61,7 @@ jobs: if: env.FILES_CHANGED == 'true' uses: peter-evans/create-pull-request@v6 with: + token: ${{ secrets.GITHUB_TOKEN }} commit-message: Update i18n files based on en-US changes title: 'chore: translate i18n files' body: This PR was automatically created to update i18n files based on changes in en-US locale.