mirror of
https://github.com/grafana/grafana.git
synced 2024-11-26 02:40:26 -06:00
I18n: Github action to fix up i18n files in Crowdin files (#78191)
* I18n: Start github action to fix up i18n files after crowdin push * finish action * change message * actions
This commit is contained in:
parent
d090dab138
commit
0a5a86f20b
1
.github/CODEOWNERS
vendored
1
.github/CODEOWNERS
vendored
@ -667,6 +667,7 @@ embed.go @grafana/grafana-as-code
|
||||
/.github/workflows/ephemeral-instances-pr-opened-closed.yml @grafana/grafana-operator-experience-squad
|
||||
/.github/workflows/create-security-patch-from-security-mirror.yml @grafana/grafana-delivery
|
||||
/.github/workflows/core-plugins-build-and-release.yml @grafana/plugins-platform-frontend @grafana/plugins-platform-backend
|
||||
/.github/workflows/i18n-crowdin-fix-files.yml @grafana/grafana-frontend-platform
|
||||
|
||||
# Generated files not requiring owner approval
|
||||
/packages/grafana-data/src/types/featureToggles.gen.ts @grafanabot
|
||||
|
46
.github/workflows/i18n-crowdin-fix-files.yml
vendored
Normal file
46
.github/workflows/i18n-crowdin-fix-files.yml
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
# When Crowdin creates a pull request from the crowdin-service-branch branch,
|
||||
# run `yarn i18n:extract` and commit the changed grafana.json files back into the PR
|
||||
# to reformat crowdin's changes to prevent conflicts with our CI checks.
|
||||
|
||||
name: Fix Crowdin I18n files
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- 'public/locales/*/grafana.json'
|
||||
branches:
|
||||
- main # Only run on pull requests *target* main (will be merged into main)
|
||||
|
||||
jobs:
|
||||
fix-files:
|
||||
# Only run on pull requests *from* the crowdin-service-branch branch
|
||||
if: github.head_ref == 'crowdin-service-branch'
|
||||
|
||||
name: Fix files
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
# write permission needed to commit changes back in
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.head_ref }}
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20.9.0
|
||||
cache: 'yarn'
|
||||
|
||||
- name: Install dependencies
|
||||
run: yarn install
|
||||
|
||||
- name: Extract I18n files
|
||||
run: yarn i18n:extract
|
||||
|
||||
- name: Commit changes
|
||||
uses: stefanzweifel/git-auto-commit-action@v5
|
||||
with:
|
||||
commit_message: "Github Action: Auto-fix i18n files"
|
||||
file_pattern: public/locales/*/grafana.json
|
Loading…
Reference in New Issue
Block a user