-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (49 loc) · 1.67 KB
/
Copy pathi18n.yml
File metadata and controls
59 lines (49 loc) · 1.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: i18n Sync
on:
push:
branches: [develop]
paths:
- "apps/web/i18n/originals/en-US.json"
- "apps/management-web/i18n/originals/en-US.json"
- "packages/helpers-i18n/i18n/originals/en-US.json"
concurrency:
group: push-${{ github.ref_name }}
cancel-in-progress: false
jobs:
sync:
if: "!contains(github.event.head_commit.message, '[bot]')"
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v7
with:
token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-node@v6
with:
node-version: "24"
cache: "npm"
- name: Pin npm version
run: npm install -g npm@11.13.0
- name: Install dependencies
run: npm ci
- name: Sync originals from en-US
run: npm run i18n:sync
- name: Compile i18n
run: npm run i18n:compile
- name: Validate i18n
run: npm run i18n:validate
- name: Commit and push if changed
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add apps/web/i18n/originals/ apps/web/i18n/overrides/
git add apps/management-web/i18n/originals/ apps/management-web/i18n/overrides/
git add packages/helpers-i18n/i18n/originals/ packages/helpers-i18n/i18n/overrides/
if git diff --staged --quiet; then
echo "No i18n changes"
else
git commit --no-verify -m "chore: sync i18n keys from en-US [bot]"
git pull --rebase origin develop || true
git push --no-verify origin develop
fi