-
Notifications
You must be signed in to change notification settings - Fork 17
51 lines (40 loc) · 1.4 KB
/
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
41
42
43
44
45
46
47
48
49
50
name: "Translations"
on:
push:
branches: [ dev, master ]
paths: [ 'src/translations/**' ]
pull_request:
paths: [ 'src/translations/**' ]
workflow_dispatch:
permissions:
contents: write
jobs:
export:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set environment variables
run: echo SCRIPTS_PATH=$(pwd) >> $GITHUB_ENV
- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.x'
- name: Install Tsukuru CLI
run: dotnet tool install -g tsukuru
- name: Validate translation project
run: tsukuru validate-translation -f translations.tsutproj
working-directory: src/translations
- name: Export SM translations
run: tsukuru export-translations -f translations.tsutproj
working-directory: src/translations
- name: Check for modified files
id: git-pending
run: echo ::set-output name=modified::$(if [ -n "$(git status --porcelain)" ]; then echo "true"; else echo "false"; fi)
- name: Push changes
if: steps.git-pending.outputs.modified == 'true'
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add -A
git commit -m '[automated] export latest translations from project'
git push