Download translation from Crowdin #211
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
name: Download translation from Crowdin | |
on: | |
schedule: | |
- cron: "10 1 * * *" | |
workflow_dispatch: | |
push: | |
branches: | |
- crowdin | |
- "crowdin_test" | |
jobs: | |
synchronize-with-crowdin: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: remove old files | |
run: | | |
rm -rf translated_content | |
- name: crowdin action | |
uses: crowdin/[email protected] | |
with: | |
upload_sources: false | |
upload_translations: false | |
download_translations: true | |
dryrun_action: false | |
# This is the name of the git branch that Crowdin will create when opening a pull request. | |
# This branch does NOT need to be manually created. It will be created automatically by the action. | |
localization_branch_name: l10n_crowdin_action | |
create_pull_request: false | |
push_translations: false | |
pull_request_title: "New Crowdin translations" | |
pull_request_body: "New Crowdin pull request with translations" | |
pull_request_labels: "translation update, automated pr" | |
# This is the name of the git branch to with pull request will be created. | |
# If not specified default repository branch will be used. | |
pull_request_base_branch_name: main | |
env: | |
GITHUB_TOKEN: ${{ secrets.REPO_SCOPED_TOKEN }} | |
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }} | |
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} | |
- name: permissions | |
# https://stackoverflow.com/questions/11774397/git-push-error-unable-to-unlink-old-permission-denied/26950991#26950991 | |
run: | | |
sudo chmod -R 777 . | |
git config core.filemode false | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v3 | |
with: | |
token: ${{ secrets.REPO_SCOPED_TOKEN }} | |
commit-message: "New Crowdin translations" | |
signoff: false | |
delete-branch: true | |
branch: l10n_crowdin_action | |
base: main | |
title: "New Crowdin translations" | |
labels: | | |
automated pr | |
assignees: | | |
newbe36524 | |
reviewers: | | |
newbe36524 |