-
Notifications
You must be signed in to change notification settings - Fork 10
57 lines (52 loc) · 1.85 KB
/
plum.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
name: Sync for plum
on:
workflow_dispatch:
push:
branches:
- master
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout plum branch
uses: actions/checkout@v3
with:
ref: 'plum'
- name: Checkout master branch to subdirectory
uses: actions/checkout@v3
with:
ref: 'master'
path: master
- name: Copy files
run: |
cp master/rime/xkjd6.*.yaml ./
cp master/rime/lua/date_time.lua ./lua/
cp master/rime/lua/xkjd6_filter.lua ./lua/
cp master/rime/lua/for_topup.lua ./lua/
cp master/rime/lua/smart_2.lua ./lua/
cp master/rime/lua/xnumber.lua ./lua/
cp master/rime/opencc/EN* ./opencc/
cp master/rime/opencc/emoji*.json ./opencc/
cp master/rime/opencc/emoji*.ocd ./opencc/
cp master/rime/opencc/ST*.txt ./opencc/
cp master/rime/opencc/TWVariants.txt ./opencc/
cp master/rime/opencc/s2tw.json ./opencc/
cp master/Tools/SystemTools/rime/xkjd6.schema.yaml ./
echo 'date_time_translator = require("date_time")' > rime.lua
echo 'xkjd6_filter = require("xkjd6_filter")' >> rime.lua
echo 'topup_processor = require("for_topup")' >> rime.lua
echo 'smart_2 = require("smart_2")' >> rime.lua
echo 'number_translator = require("xnumber")' >> rime.lua
- name: Remove redundancy files
run: |
rm xkjd6.wxwdanzi.dict.yaml
rm -rf master
- name: Commit and push
run: |
if [[ -n "$(git status --porcelain)" ]]; then
TIMESTAMP=$(date +%Y%m%d_%H%M%S)
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git commit -a -m "update on $TIMESTAMP"
git push
fi