Skip to content

paratranz-update

paratranz-update #34

Workflow file for this run

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