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
|
|
|
|
runs-on: ubuntu-20.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
|
2023-05-06 02:22:58 +02:00
|
|
|
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
|
2021-08-13 16:31:36 +02:00
|
|
|
|
2023-04-18 12:48:05 +02:00
|
|
|
- name: Login to Azure - CI Subscription
|
2023-09-06 16:30:47 +02:00
|
|
|
uses: Azure/login@92a5484dfaf04ca78a94597f4f19fea633851fa2 # v1.4.6
|
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
|
2023-06-13 16:57:02 +02:00
|
|
|
uses: crowdin/github-action@965d501f160af7b1f88aed4c29154b0caf1e94b9 # v1.9.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 }}
|