fix: resolve i18n workflow permissions and naming issues (#23494)
This commit is contained in:
@@ -5,6 +5,10 @@ on:
|
|||||||
types: [closed]
|
types: [closed]
|
||||||
branches: [main]
|
branches: [main]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
pull-requests: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check-and-update:
|
check-and-update:
|
||||||
if: github.event.pull_request.merged == true
|
if: github.event.pull_request.merged == true
|
||||||
@@ -16,7 +20,7 @@ jobs:
|
|||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 2 # last 2 commits
|
fetch-depth: 2 # last 2 commits
|
||||||
persist-credentials: false
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Check for file changes in i18n/en-US
|
- name: Check for file changes in i18n/en-US
|
||||||
id: check_files
|
id: check_files
|
||||||
@@ -49,7 +53,7 @@ jobs:
|
|||||||
if: env.FILES_CHANGED == 'true'
|
if: env.FILES_CHANGED == 'true'
|
||||||
run: pnpm install --frozen-lockfile
|
run: pnpm install --frozen-lockfile
|
||||||
|
|
||||||
- name: Run npm script
|
- name: Generate i18n translations
|
||||||
if: env.FILES_CHANGED == 'true'
|
if: env.FILES_CHANGED == 'true'
|
||||||
run: pnpm run auto-gen-i18n
|
run: pnpm run auto-gen-i18n
|
||||||
|
|
||||||
@@ -57,6 +61,7 @@ jobs:
|
|||||||
if: env.FILES_CHANGED == 'true'
|
if: env.FILES_CHANGED == 'true'
|
||||||
uses: peter-evans/create-pull-request@v6
|
uses: peter-evans/create-pull-request@v6
|
||||||
with:
|
with:
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
commit-message: Update i18n files based on en-US changes
|
commit-message: Update i18n files based on en-US changes
|
||||||
title: 'chore: translate i18n files'
|
title: 'chore: translate i18n files'
|
||||||
body: This PR was automatically created to update i18n files based on changes in en-US locale.
|
body: This PR was automatically created to update i18n files based on changes in en-US locale.
|
||||||
|
Reference in New Issue
Block a user