forked from Zettlr/Zettlr
-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (49 loc) · 1.46 KB
/
i18n.yaml
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
name: i18n
on:
push:
paths:
- '.github/workflows/i18n.yaml'
workflow_dispatch: {} # Enable manual triggers
schedule:
- cron: '17 2 * * *' # Run every night at 02:17 (random minute to avoid high loads)
permissions:
contents: write
env:
NODE_VERSION: '16'
jobs:
refresh:
name: i18n
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v3
with:
ref: develop
- name: Setup NodeJS ${{ env.NODE_VERSION }}
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'yarn'
# The scripts require some modules that we need to install.
- name: Install dependencies
run: yarn install --immutable
# Gettext is not installed on Ubuntu by default, so we have to do it here
- name: Install gettext
run: |
sudo apt-get update
sudo apt-get install gettext
- name: Configure git
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
# Update translations
- name: Update translations
run: |
./scripts/i18n.sh
git add -A
git diff-index --quiet HEAD || git commit -m "chore(i18n): Update translations"
- name: Push changes
uses: ad-m/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: develop