Skip to content

Commit c95761f

Browse files
authored
fix: resolve i18n workflow permissions and naming issues (langgenius#23494)
1 parent 1f15cba commit c95761f

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

.github/workflows/translate-i18n-base-on-english.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ on:
55
types: [closed]
66
branches: [main]
77

8+
permissions:
9+
contents: write
10+
pull-requests: write
11+
812
jobs:
913
check-and-update:
1014
if: github.event.pull_request.merged == true
@@ -16,7 +20,7 @@ jobs:
1620
- uses: actions/checkout@v4
1721
with:
1822
fetch-depth: 2 # last 2 commits
19-
persist-credentials: false
23+
token: ${{ secrets.GITHUB_TOKEN }}
2024

2125
- name: Check for file changes in i18n/en-US
2226
id: check_files
@@ -49,14 +53,15 @@ jobs:
4953
if: env.FILES_CHANGED == 'true'
5054
run: pnpm install --frozen-lockfile
5155

52-
- name: Run npm script
56+
- name: Generate i18n translations
5357
if: env.FILES_CHANGED == 'true'
5458
run: pnpm run auto-gen-i18n
5559

5660
- name: Create Pull Request
5761
if: env.FILES_CHANGED == 'true'
5862
uses: peter-evans/create-pull-request@v6
5963
with:
64+
token: ${{ secrets.GITHUB_TOKEN }}
6065
commit-message: Update i18n files based on en-US changes
6166
title: 'chore: translate i18n files'
6267
body: This PR was automatically created to update i18n files based on changes in en-US locale.

0 commit comments

Comments
 (0)