2021-09-02 22:03:47 +02:00
|
|
|
---
|
2021-08-13 16:06:28 +02:00
|
|
|
name: Crowdin Sync
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
inputs: {}
|
2021-11-04 21:09:20 +01:00
|
|
|
schedule:
|
|
|
|
- cron: '0 0 * * 5'
|
2021-08-13 16:06:28 +02:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
crowdin-sync:
|
|
|
|
name: Autosync
|
|
|
|
runs-on: ubuntu-20.04
|
2022-05-10 16:20:32 +02:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
- app_name: browser
|
|
|
|
crowdin_project_id: "268134"
|
|
|
|
- app_name: desktop
|
|
|
|
crowdin_project_id: "299360"
|
2021-08-13 16:06:28 +02:00
|
|
|
steps:
|
|
|
|
- name: Checkout repo
|
|
|
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
|
|
|
|
|
|
|
- name: Login to Azure
|
|
|
|
uses: Azure/login@77f1b2e3fb80c0e8645114159d17008b8a2e475a
|
|
|
|
with:
|
|
|
|
creds: ${{ secrets.AZURE_PROD_KV_CREDENTIALS }}
|
|
|
|
|
|
|
|
- name: Retrieve secrets
|
|
|
|
id: retrieve-secrets
|
|
|
|
uses: Azure/get-keyvault-secrets@80ccd3fafe5662407cc2e55f202ee34bfff8c403
|
|
|
|
with:
|
|
|
|
keyvault: "bitwarden-prod-kv"
|
|
|
|
secrets: "crowdin-api-token"
|
|
|
|
|
2021-08-25 23:41:11 +02:00
|
|
|
- name: Download translations
|
2022-05-26 19:55:52 +02:00
|
|
|
uses: bitwarden/gh-actions/crowdin@05052c5c575ceb09ceea397fe241879e199ed44b
|
2021-08-13 16:10:44 +02:00
|
|
|
env:
|
2021-08-25 23:41:11 +02:00
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2021-08-13 16:10:44 +02:00
|
|
|
CROWDIN_API_TOKEN: ${{ steps.retrieve-secrets.outputs.crowdin-api-token }}
|
2022-05-10 16:20:32 +02:00
|
|
|
CROWDIN_PROJECT_ID: ${{ matrix.crowdin_project_id }}
|
2021-08-25 23:41:11 +02:00
|
|
|
with:
|
2022-05-26 19:55:52 +02:00
|
|
|
config: crowdin.yml
|
2021-08-25 23:41:11 +02:00
|
|
|
crowdin_branch_name: master
|
2021-08-26 00:00:56 +02:00
|
|
|
upload_sources: false
|
2021-08-25 23:41:11 +02:00
|
|
|
upload_translations: false
|
|
|
|
download_translations: true
|
|
|
|
github_user_name: "github-actions"
|
|
|
|
github_user_email: "<>"
|
|
|
|
commit_message: "Autosync the updated translations"
|
2022-05-26 19:55:52 +02:00
|
|
|
localization_branch_name: crowdin-auto-sync-${{ matrix.app_name }}
|
2021-08-25 23:41:11 +02:00
|
|
|
create_pull_request: true
|
2022-05-10 16:20:32 +02:00
|
|
|
pull_request_title: "Autosync Crowdin Translations for ${{ matrix.app_name }}"
|
2021-08-25 23:41:11 +02:00
|
|
|
pull_request_body: "Autosync the updated translations"
|
2022-05-26 19:55:52 +02:00
|
|
|
working_directory: apps/${{ matrix.app_name }}
|