Skip to content

Commit 7e980e9

Browse files
committed
ci: add i18n-meta workflow to update en.meta.json
1 parent 2c8daee commit 7e980e9

1 file changed

Lines changed: 48 additions & 0 deletions

File tree

.github/workflows/i18n-meta.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: i18n-meta
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- 'i18n/locales/en.json'
9+
10+
permissions:
11+
contents: write
12+
13+
jobs:
14+
update:
15+
name: 🌐 Update en.meta.json
16+
runs-on: ubuntu-24.04-arm
17+
18+
steps:
19+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
20+
with:
21+
fetch-depth: 2
22+
23+
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
24+
with:
25+
node-version: lts/*
26+
27+
- uses: pnpm/action-setup@1e1c8eafbd745f64b1ef30a7d7ed7965034c486c # 1e1c8eafbd745f64b1ef30a7d7ed7965034c486c
28+
name: 🟧 Install pnpm
29+
with:
30+
cache: true
31+
32+
- name: 📦 Install dependencies
33+
run: pnpm install
34+
35+
- name: 🌐 Update i18n metadata
36+
run: pnpm i18n:meta:update-en-meta
37+
38+
- name: ⬆︎ Commit and Push changes
39+
run: |
40+
git config --global user.name "github-actions[bot]"
41+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
42+
git add i18n/locales/en.meta.json
43+
if ! git diff --cached --quiet; then
44+
git commit -m "chore(i18n): update `en.meta.json` [skip ci]"
45+
git push
46+
else
47+
echo "No changes in en.meta.json, skipping commit."
48+
fi

0 commit comments

Comments
 (0)