Skip to content

Merge pull request #58 from amorphobia/fix_sync #12

Merge pull request #58 from amorphobia/fix_sync

Merge pull request #58 from amorphobia/fix_sync #12

Workflow file for this run

name: Merge minimum dictionary
on:
workflow_dispatch:
push:
branches:
- master
jobs:
merge:
runs-on: ubuntu-latest
steps:
- name: Checkout min branch
uses: actions/checkout@v3
with:
ref: 'min'
- name: Checkout master branch to subdirectory
uses: actions/checkout@v3
with:
ref: 'master'
path: master
- name: Merge dictionaries of master
run: |
cd master/rime
for dict in danzi cizu fuhao buchong lianjie yingwen chaojizici wxw
do
sed '0,/^\.\.\.$/d' xkjd6.${dict}.dict.yaml >> xkjd6.dict.yaml
rm xkjd6.${dict}.dict.yaml
done
rm xkjd6.extended.dict.yaml xkjd6.wxwdanzi.dict.yaml
- name: Copy files and remove
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
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