Crowdin Sync #889
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Workflow that syncronizes translations from Crowdin | |
name: Crowdin Sync | |
on: | |
# Check for updates every day | |
schedule: | |
- cron: '0 0 * * *' | |
# Sync when a commit is done on maintenance-3.1.x | |
push: | |
branches: | |
- maintenance-3.1.x | |
paths: | |
- 'i18n/messages.json' | |
# Manually trigger the workflow | |
workflow_dispatch: | |
jobs: | |
crowdin: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Crowdin Action | |
uses: crowdin/github-action@v1 | |
with: | |
# Tokens | |
project_id: ${{ secrets.CROWDIN_PROJECT_ID }} | |
token: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} | |
# Load external configuration file (to support translation rename) | |
config: crowdin-conf.yml | |
# Upload sources for translation | |
upload_sources: true | |
# Auto-approve reference sentences we are pushing (english) | |
auto_approve_imported: true | |
# Name of the branch where to merge the translations | |
localization_branch_name: crowdin-translations-update | |
create_pull_request: true | |
pull_request_title: 'New Crowdin translations' | |
pull_request_body: 'New Crowdin pull request with translations' | |
# The commit message | |
commit_message: 'Automatic update of translations from Crowdin' | |
# Automatically download all the new translations | |
download_translations: true | |
# User properties | |
github_user_name: nuxeo-webui-jx-bot | |
github_user_email: [email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.WEBUI_JX_BOT_GITHUB_ACTIONS_TOKEN }} |