-
Notifications
You must be signed in to change notification settings - Fork 10
48 lines (39 loc) · 1.16 KB
/
generate-static-locale-data.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
name: "Generate static data for locales"
on:
workflow_dispatch:
push:
branches:
- "master"
paths:
- "locales/**"
- "utils/i18n/*"
- .github/workflows/generate-static-locale-data.yml
pull_request:
paths:
- "locales/**"
- "utils/i18n/*"
- .github/workflows/generate-static-locale-data.yml
jobs:
generate-static-locale-data:
name: "Regenerate static locale data if applicable"
runs-on: "ubuntu-latest"
permissions:
contents: "write"
steps:
- uses: actions/checkout@v4
- name: "Set up python 3.13"
uses: actions/setup-python@v5
with:
python-version: 3.13
cache: "pip"
cache-dependency-path: "utils/i18n/requirements.txt"
- name: Install dependencies
run: pip install -r 'utils/i18n/requirements.txt'
- name: Generate locale data
run: python ./utils/i18n/generate.py
- name: Commit if applicable
if: github.event_name == 'push'
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "Regenerate static locale data"
file_pattern: 'src/helpers/i18n_data.py'