2021-09-02 22:04:41 +02:00
|
|
|
---
|
2021-08-13 16:31:36 +02:00
|
|
|
name: Crowdin Sync
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
inputs: {}
|
2021-11-05 18:59:15 +01:00
|
|
|
schedule:
|
|
|
|
- cron: '0 0 * * 5'
|
2021-08-13 16:31:36 +02:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
crowdin-sync:
|
|
|
|
name: Autosync
|
2024-05-06 16:18:38 +02:00
|
|
|
runs-on: ubuntu-22.04
|
2021-09-02 22:04:41 +02:00
|
|
|
env:
|
2021-08-27 19:08:40 +02:00
|
|
|
_CROWDIN_PROJECT_ID: "269690"
|
2021-08-13 16:31:36 +02:00
|
|
|
steps:
|
|
|
|
- name: Checkout repo
|
2024-07-16 21:06:47 +02:00
|
|
|
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
2021-08-13 16:31:36 +02:00
|
|
|
|
2023-04-18 12:48:05 +02:00
|
|
|
- name: Login to Azure - CI Subscription
|
2024-01-24 16:07:10 +01:00
|
|
|
uses: Azure/login@e15b166166a8746d1a47596803bd8c1b595455cf # v1.6.0
|
2021-08-13 22:28:07 +02:00
|
|
|
with:
|
2023-04-11 17:18:59 +02:00
|
|
|
creds: ${{ secrets.AZURE_KV_CI_SERVICE_PRINCIPAL }}
|
2021-08-13 22:28:07 +02:00
|
|
|
|
|
|
|
- name: Retrieve secrets
|
|
|
|
id: retrieve-secrets
|
2023-11-09 16:18:34 +01:00
|
|
|
uses: bitwarden/gh-actions/get-keyvault-secrets@main
|
2022-10-17 17:19:06 +02:00
|
|
|
with:
|
2023-04-11 17:18:59 +02:00
|
|
|
keyvault: "bitwarden-ci"
|
2022-10-17 17:19:06 +02:00
|
|
|
secrets: "crowdin-api-token, github-gpg-private-key, github-gpg-private-key-passphrase"
|
2021-08-13 22:28:07 +02:00
|
|
|
|
2021-08-27 19:08:40 +02:00
|
|
|
- name: Download translations
|
2024-06-03 22:51:08 +02:00
|
|
|
uses: crowdin/github-action@61ac8b980551f674046220c3e104bddae2916ac5 # v2.0.0
|
2021-08-13 22:28:07 +02:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2021-08-27 19:08:40 +02:00
|
|
|
CROWDIN_API_TOKEN: ${{ steps.retrieve-secrets.outputs.crowdin-api-token }}
|
|
|
|
with:
|
|
|
|
config: crowdin.yml
|
2023-12-12 20:12:27 +01:00
|
|
|
crowdin_branch_name: main
|
2021-08-27 19:08:40 +02:00
|
|
|
upload_sources: false
|
|
|
|
upload_translations: false
|
|
|
|
download_translations: true
|
2022-10-17 17:19:06 +02:00
|
|
|
github_user_name: "bitwarden-devops-bot"
|
|
|
|
github_user_email: "106330231+bitwarden-devops-bot@users.noreply.github.com"
|
2021-08-27 19:08:40 +02:00
|
|
|
commit_message: "Autosync the updated translations"
|
|
|
|
localization_branch_name: crowdin-auto-sync
|
|
|
|
create_pull_request: true
|
|
|
|
pull_request_title: "Autosync Crowdin Translations"
|
|
|
|
pull_request_body: "Autosync the updated translations"
|
2022-10-17 17:19:06 +02:00
|
|
|
gpg_private_key: ${{ steps.retrieve-secrets.outputs.github-gpg-private-key }}
|
2023-04-11 17:18:59 +02:00
|
|
|
gpg_passphrase: ${{ steps.retrieve-secrets.outputs.github-gpg-private-key-passphrase }}
|