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
|
2024-02-08 21:56:39 +01:00
|
|
|
runs-on: ubuntu-22.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
|
2024-09-30 11:46:20 +02:00
|
|
|
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
|
2021-08-13 16:06:28 +02:00
|
|
|
|
|
|
|
- name: Login to Azure
|
2024-02-08 20:38:19 +01:00
|
|
|
uses: Azure/login@e15b166166a8746d1a47596803bd8c1b595455cf # v1.6.0
|
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-11-08 19:08:34 +01:00
|
|
|
uses: bitwarden/gh-actions/get-keyvault-secrets@main
|
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-11-08 19:08:34 +01:00
|
|
|
uses: bitwarden/gh-actions/crowdin@main
|
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
|
2023-12-12 20:57:50 +01:00
|
|
|
crowdin_branch_name: main
|
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 }}
|