From b0c75eae60db771bfb684b6e5030c6a877ee91a8 Mon Sep 17 00:00:00 2001 From: "Nicholas Carrigan (he/him)" Date: Fri, 2 Apr 2021 05:16:00 -0700 Subject: [PATCH] feat(tools): use camperbot for commit (#41659) --- .../crowdin-i18n-client-ui-download.yml | 18 ++++++++++++++---- .../crowdin-i18n-curriculum-download.yml | 19 ++++++++++++++----- .../workflows/crowdin-i18n-docs-download..yml | 18 ++++++++++++++---- 3 files changed, 42 insertions(+), 13 deletions(-) diff --git a/.github/workflows/crowdin-i18n-client-ui-download.yml b/.github/workflows/crowdin-i18n-client-ui-download.yml index fd48361130..7dbfdf0fbd 100644 --- a/.github/workflows/crowdin-i18n-client-ui-download.yml +++ b/.github/workflows/crowdin-i18n-client-ui-download.yml @@ -3,7 +3,7 @@ on: workflow_dispatch: schedule: # runs every day at 12:15 PM UTC - - cron: "15 12 * * *" + - cron: '15 12 * * *' jobs: i18n-download-client-ui-translations: @@ -65,9 +65,7 @@ jobs: skip_untranslated_files: false export_only_approved: true - commit_message: 'chore(i8n,client): processed translations' - localization_branch_name: i18n-sync-client - push_translations: true + push_translations: false # pull-request create_pull_request: false @@ -84,6 +82,18 @@ jobs: CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID_CLIENT }} CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_CAMPERBOT_SERVICE_TOKEN }} + # Create Commit + - name: Commit Changes + env: + EMAIL: ${{ secrets.ACTIONS_CAMPERBOT_EMAIL }} + run: | + git checkout -b i18n-sync-client + git config --global user.name "camperbot" + git config --global user.email "$EMAIL" + git add . + git commit -m "chore: update translations" + git push -u origin i18n-sync-client -f + - name: Install Dependencies working-directory: ./tools run: | diff --git a/.github/workflows/crowdin-i18n-curriculum-download.yml b/.github/workflows/crowdin-i18n-curriculum-download.yml index c8bfd4d3ac..9e2ec6e8f3 100644 --- a/.github/workflows/crowdin-i18n-curriculum-download.yml +++ b/.github/workflows/crowdin-i18n-curriculum-download.yml @@ -3,7 +3,7 @@ on: workflow_dispatch: schedule: # runs every day at 12:30 PM UTC - - cron: "30 12 * * *" + - cron: '30 12 * * *' jobs: i18n-download-curriculum-translations: @@ -65,10 +65,7 @@ jobs: skip_untranslated_files: true export_only_approved: true - - commit_message: 'chore(i8n,curriculum): processed translations' - localization_branch_name: i18n-sync-curriculum - push_translations: true + push_translations: false # pull-request create_pull_request: false @@ -85,6 +82,18 @@ jobs: CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID_CURRICULUM }} CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_CAMPERBOT_SERVICE_TOKEN }} + # Create Commit + - name: Commit Changes + env: + EMAIL: ${{ secrets.ACTIONS_CAMPERBOT_EMAIL }} + run: | + git checkout -b i18n-sync-curriculum + git config --global user.name "camperbot" + git config --global user.email "$EMAIL" + git add . + git commit -m "chore: update translations" + git push -u origin i18n-sync-curriculum -f + - name: Install Dependencies working-directory: ./tools run: | diff --git a/.github/workflows/crowdin-i18n-docs-download..yml b/.github/workflows/crowdin-i18n-docs-download..yml index 29fbc12828..b9da9c10bc 100644 --- a/.github/workflows/crowdin-i18n-docs-download..yml +++ b/.github/workflows/crowdin-i18n-docs-download..yml @@ -3,7 +3,7 @@ on: workflow_dispatch: schedule: # runs every day at 12:00 noon UTC - - cron: "0 12 * * *" + - cron: '0 12 * * *' jobs: i18n-download-docs-translations: @@ -99,9 +99,7 @@ jobs: skip_untranslated_files: false export_only_approved: true - commit_message: 'chore(i8n,docs): processed translations' - localization_branch_name: i18n-sync-docs - push_translations: true + push_translations: false # pull-request create_pull_request: false @@ -118,6 +116,18 @@ jobs: CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID_DOCS }} CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_CAMPERBOT_SERVICE_TOKEN }} + # Create Commit + - name: Commit Changes + env: + EMAIL: ${{ secrets.ACTIONS_CAMPERBOT_EMAIL }} + run: | + git checkout -b i18n-sync-docs + git config --global user.name "camperbot" + git config --global user.email "$EMAIL" + git add . + git commit -m "chore: update translations" + git push -u origin i18n-sync-docs -f + - name: Install Dependencies working-directory: ./tools run: |