Skip to content

Merge pull request #57 from xkinput/tswwe-patch-1 #26

Merge pull request #57 from xkinput/tswwe-patch-1

Merge pull request #57 from xkinput/tswwe-patch-1 #26

Workflow file for this run

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 "[email protected]"
git config --local user.name "GitHub Action"
git commit -a -m "update on $TIMESTAMP"
git push
fi