-
Notifications
You must be signed in to change notification settings - Fork 73
40 lines (34 loc) · 1.07 KB
/
update-translations.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
name: Update translations
on:
push:
branches:
- master
jobs:
run:
runs-on: ubuntu-20.04
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
token: ${{ secrets.TRANSLATIONS_UPDATE }}
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Install dependencies
run: sudo apt-get install -y gettext
- name: Run Maven
run: mvn -Pupdate-translations validate
- name: Check changes
id: check-changes
continue-on-error: true
# check if anything except "POT creation date" has changed
run: git diff --numstat i18n/keys.pot | awk '{ if($1 == 1 && $2 == 1) { exit 1 } else exit 0 }'
- name: Commit changes
if: steps.check-changes.outcome == 'success' && steps.check-changes.conclusion == 'success'
uses: EndBug/add-and-commit@v6
with:
author_name: PhoenicisBot
author_email: git@phoenicis.org
message: 'Update translations'
add: '*.pot'