-
Notifications
You must be signed in to change notification settings - Fork 38
50 lines (42 loc) · 1.36 KB
/
i18n.yml
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
name: i18n CI
on:
push:
branches:
- main
permissions:
actions: read
contents: write
checks: write
pull-requests: write
jobs:
main:
runs-on: ubuntu-latest
if: github.head_ref != 'weblate-postybirb-postybirb'
steps:
- name: Check out Git repository
uses: actions/checkout@v4
- name: Install Node.js, NPM and Yarn
uses: actions/setup-node@v4
with:
cache: yarn
# Note: These flags needed to speed up ci
- name: Install dependencies
run: yarn install --frozen-lockfile --prefer-offline
# Extracts i18n strings from code
- name: Extract i18n keys
run: yarn lingui:extract
# It commits extracted i18n string and eslint/prettier fixes
- name: Commit changes
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
# pull only from main branch so it will not fetch all tags
git pull origin main
git add lang/*
# ignore when nothing to commit
yarn exitzero "git commit -m 'ci: extract i18n messages'"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}