mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-25 22:25:00 +00:00
ci: add Localization Check CI (#600)
Signed-off-by: Gadfly <gadfly@gadfly.vip>
This commit is contained in:
parent
fa4f0a6bd4
commit
32de28c16e
7 changed files with 300 additions and 1 deletions
42
.github/workflows/localization-check.yml
vendored
Normal file
42
.github/workflows/localization-check.yml
vendored
Normal file
|
@ -0,0 +1,42 @@
|
|||
name: Localization Check
|
||||
on:
|
||||
push:
|
||||
branches: [ develop ]
|
||||
paths:
|
||||
- 'src/Resources/Locales/**'
|
||||
- 'README.md'
|
||||
workflow_dispatch:
|
||||
workflow_call:
|
||||
|
||||
jobs:
|
||||
localization-check:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20.x'
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm install fs-extra@11.2.0 path@0.12.7 xml2js@0.6.2
|
||||
|
||||
- name: Run localization check
|
||||
run: node .github/scripts/localization-check.js
|
||||
|
||||
- name: Commit changes
|
||||
run: |
|
||||
git config --global user.name 'github-actions[bot]'
|
||||
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
|
||||
if [ -n "$(git status --porcelain)" ]; then
|
||||
git add README.md TRANSLATION.md
|
||||
git commit -m 'doc: Update translation status and missing keys'
|
||||
git push
|
||||
else
|
||||
echo "No changes to commit"
|
||||
fi
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
Loading…
Add table
Add a link
Reference in a new issue