locales-coverage.yml 832 B

1234567891011121314151617181920212223242526272829303132
  1. name: Build locales coverage
  2. on:
  3. push:
  4. branches:
  5. - "l10n_master"
  6. jobs:
  7. locales:
  8. runs-on: ubuntu-latest
  9. steps:
  10. - uses: actions/checkout@v2
  11. with:
  12. token: ${{ secrets.PUSH_TRANSLATIONS_COVERAGE_PAT }}
  13. - name: Setup Node.js 12.x
  14. uses: actions/setup-node@v1
  15. with:
  16. node-version: 12.x
  17. - name: Create report file
  18. run: |
  19. npm run locales-coverage
  20. FILE_CHANGED=$(git diff src/locales/percentages.json)
  21. if [ ! -z "${FILE_CHANGED}" ]; then
  22. git config --global user.name 'Kostas Bariotis'
  23. git config --global user.email '[email protected]'
  24. git add src/locales/percentages.json
  25. git commit -am "Auto commit: Calculate translation coverage"
  26. git push
  27. fi