37 lines
955 B
YAML
37 lines
955 B
YAML
|
name: Build locales percentages
|
||
|
|
||
|
on:
|
||
|
push:
|
||
|
branches:
|
||
|
- "master"
|
||
|
paths:
|
||
|
- "src/locales/**.json"
|
||
|
- "!src/locales/percentages.json"
|
||
|
|
||
|
jobs:
|
||
|
locales:
|
||
|
runs-on: ubuntu-latest
|
||
|
|
||
|
steps:
|
||
|
- uses: actions/checkout@v2
|
||
|
with:
|
||
|
token: ${{ secrets.PUSH_TRANSLATIONS_COVERAGE_PAT }}
|
||
|
|
||
|
- name: Setup Node.js 12.x
|
||
|
uses: actions/setup-node@v1
|
||
|
with:
|
||
|
node-version: 12.x
|
||
|
|
||
|
- name: Create report file
|
||
|
run: |
|
||
|
npm run locales-coverage
|
||
|
FILE_CHANGED=$(git diff src/locales/percentages.json)
|
||
|
if [ ! -z "${FILE_CHANGED}" ]; then
|
||
|
git config --global user.name 'Kostas Bariotis'
|
||
|
git config --global user.email 'konmpar@gmail.com'
|
||
|
git add src/locales/percentages.json
|
||
|
git commit -am "Auto commit: Calculate translation coverage"
|
||
|
git pull origin master --rebase
|
||
|
git push
|
||
|
fi
|