-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (42 loc) · 1.22 KB
/
update-texts.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
name: paratranz-update
on:
#runs at 11:10 UTC every day
#11:10 UTC = 19:10 CST (China Standard Time)
schedule:
- cron: '10 11 * * 6'
workflow_dispatch:
jobs:
update:
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Switch branch
run: git checkout -b paratranz-update
- name: Get the output zip
run: |
curl -X 'GET' \
'https://paratranz.cn/api/projects/5342/artifacts/download' \
-H 'accept: */*' \
-H 'Authorization: ${{ secrets.PARATRANZ_API_TOKEN }}' -L --output text.zip
- name: Cleanup the folder
run: |
rm -r cn_text
mkdir cn_text
- name: Unzip
run: |
mkdir temp
unzip text.zip -d temp
cp temp/special/* cn_text/ -r
cp temp/chars.txt .
- name: Cleanup the folder
run: |
rm -r temp
- name: Setup git user
uses: fregante/setup-git-user@v2
- name: Commit Changes & Push to Remote Branch
run: |
git add -A
git commit -m "feat(translation): update translated text"
git push -u origin paratranz-update -f