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"
|
2022-06-07 15:18:46 +02:00
|
|
|
- app_name: web
|
|
|
|
crowdin_project_id: "308189"
|
2021-08-13 16:06:28 +02:00
|
|
|
steps:
|
|
|
|
- name: Checkout repo
|
2023-05-09 18:38:11 +02:00
|
|
|
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
|
2021-08-13 16:06:28 +02:00
|
|
|
|
|
|
|
- name: Login to Azure
|
2023-05-09 18:38:11 +02:00
|
|
|
uses: Azure/login@92a5484dfaf04ca78a94597f4f19fea633851fa2 # v1.4.7
|
2021-08-13 16:06:28 +02:00
|
|
|
with:
|
2023-04-11 18:37:58 +02:00
|
|
|
creds: ${{ secrets.AZURE_KV_CI_SERVICE_PRINCIPAL }}
|
2021-08-13 16:06:28 +02:00
|
|
|
|
|
|
|
- name: Retrieve secrets
|
|
|
|
id: retrieve-secrets
|
2023-05-05 22:17:19 +02:00
|
|
|
uses: bitwarden/gh-actions/get-keyvault-secrets@34ecb67b2a357795dc893549df0795e7383ff50f
|
2022-10-13 21:38:47 +02:00
|
|
|
with:
|
2023-04-11 18:37:58 +02:00
|
|
|
keyvault: "bitwarden-ci"
|
2022-10-13 23:47:13 +02:00
|
|
|
secrets: "crowdin-api-token, github-gpg-private-key, github-gpg-private-key-passphrase"
|
2021-08-13 16:06:28 +02:00
|
|
|
|
2021-08-25 23:41:11 +02:00
|
|
|
- name: Download translations
|
2023-05-05 22:17:19 +02:00
|
|
|
uses: bitwarden/gh-actions/crowdin@34ecb67b2a357795dc893549df0795e7383ff50f
|
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
|
2022-10-13 23:47:13 +02:00
|
|
|
github_user_name: "bitwarden-devops-bot"
|
|
|
|
github_user_email: "106330231+bitwarden-devops-bot@users.noreply.github.com"
|
2021-08-25 23:41:11 +02:00
|
|
|
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 }}
|
2022-10-13 23:47:13 +02:00
|
|
|
gpg_private_key: ${{ steps.retrieve-secrets.outputs.github-gpg-private-key }}
|
|
|
|
gpg_passphrase: ${{ steps.retrieve-secrets.outputs.github-gpg-private-key-passphrase }}
|
|
|
|
|