-
Notifications
You must be signed in to change notification settings - Fork 26
60 lines (53 loc) · 1.77 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
51
52
53
54
55
56
57
58
59
60
name: i18n
on:
workflow_dispatch:
push:
branches: [ main ]
paths:
- "apps/*/.env"
jobs:
create:
runs-on: ubuntu-latest
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
steps:
- uses: actions/checkout@master
name: Check out code
- name: Update translation.json
run: |
echo "start to update translation.json"
cd i18n
pip3 install python-dotenv
python3 create.py
- name: push i18n
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: push i18n
push_options: --force
pr:
runs-on: ubuntu-latest
if: github.event_name == 'workflow_dispatch'
strategy:
matrix:
repository: ['Websoft9/plugin-appstore', 'Websoft9/plugin-myapps']
steps:
- name: Checkout
uses: actions/checkout@v3
with:
repository: ${{ matrix.repository }}
ref: main
- name: Update languages files
run: |
cd public
wget https://raw.githubusercontent.com/Websoft9/docker-library/main/i18n/translation.json
wget https://raw.githubusercontent.com/Websoft9/docker-library/main/i18n/pr.py
python3 pr.py translation.json po.en_US.js po.zh_CN.js
rm -rf pr.py translation.json
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.ZJ_ADMIN_TOKEN }}
branch: update-${{ matrix.repository }}-version-${{ github.run_number }}
delete-branch: true
commit-message: "${{ matrix.repository }} combine translation.json"
title: "${{ matrix.repository }} combine translation.json"
body: "${{ matrix.repository }} combine translation.json"