Skip to content

Download crowdin files #5120

Download crowdin files

Download crowdin files #5120

name: Download crowdin files
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
on:
schedule:
- cron: '0 */6 * * *'
workflow_dispatch:
jobs:
download-from-crowdin:
name: Download sources from Crowdin
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
with:
token: ${{ secrets.BOT_TOKEN }}
- uses: actions/setup-node@969bd2663942d722d85b6a8626225850c2f7be4b # v3.4.1
with:
node-version-file: '.nvmrc'
cache: 'yarn'
- name: crowdin action
uses: crowdin/github-action@97aa99cbebfe99b964e3521e6421c1518146d4b9 # v1.4.12
with:
project_id: 502668
token: ${{ secrets.CROWDIN_TOKEN }}
upload_translations: false
download_translations: true
create_pull_request: false
push_translations: false
config: 'crowdin.yml'
env:
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_TOKEN }}
- name: check diff
run: |
if [[ -z $(git status -s) ]]
then
echo "tree is clean"
else
yarn --frozen-lockfile
yarn i18n:compile
git add .
git config --global user.name 'Crowdin bot'
git config --global user.email '[email protected]'
git commit -am "chore(i18n): synchronize translations from crowdin [skip cypress]"
git push
exit
fi