Skip to content

Translation Key Check (zh-TW) #62

Translation Key Check (zh-TW)

Translation Key Check (zh-TW) #62

name: Translation Key Check (zh-TW)
on:
schedule:
# Run once per day at 00:00 UTC
- cron: "0 0 * * *"
workflow_dispatch:
jobs:
check-translation-keys:
name: Compare zh-TW keys with en.json
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Run translation key comparison
run: |
node ./scripts/compare-translation-keys.mjs
- name: Upload markdown report artifact
if: always()
uses: actions/upload-artifact@v4
with:
name: translation-report
path: .github/translation-report.md
- name: Commit updated report and cache
if: always()
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add .github/translation-report.md .github/translation-version.json
if git diff --cached --quiet; then
echo "No changes to commit."
exit 0
fi
git commit -m "chore: update translation key report"
git push