From fc0ae25de7f8586c2a36268cba028d5dddd63447 Mon Sep 17 00:00:00 2001 From: Wilco Alsemgeest Date: Sun, 13 Jun 2021 14:15:21 +0200 Subject: [PATCH] Create crowdin-wf.yml GitHub Actions Crowdin Workflow. First run will be a dry run to check the configuration. Then a run to put the already existing translations into Crowdin. Then it will be configured for the hourly run. --- .github/workflows/crowdin-wf.yml | 47 ++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/crowdin-wf.yml diff --git a/.github/workflows/crowdin-wf.yml b/.github/workflows/crowdin-wf.yml new file mode 100644 index 00000000..379293da --- /dev/null +++ b/.github/workflows/crowdin-wf.yml @@ -0,0 +1,47 @@ +name: Crowdin Action +# Controls when the action will run. +on: + schedule: + - cron: '43 * * * *' + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + synchronize-with-crowdin: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - name: Checkout + uses: actions/checkout@v2 + + # Runs the Crowdin action command - https://github.com/crowdin/github-action + - name: crowdin action + uses: crowdin/github-action@1.1.0 + with: + # Upload sources to Crowdin + upload_sources: true + # Upload translations to Crowdin, only use true at initial run + upload_translations: true + # Make pull request of Crowdin translations + download_translations: false + # Only download translated strings + skip_untranslated_strings: false + # Download translations with pushing to branch + push_translations: true + # To download translations to the specified version branch + localization_branch_name: 'l10n_crowdin_translations' + # Create pull request after pushing to branch + create_pull_request: true + # Configuration file to use + config: 'crowdin.yml' + # Use true for dryrun to test the run without actually processing anything + dryrun_action: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}