2021-09-02 23:04:41 +03:00
|
|
|
---
|
2021-08-13 17:31:36 +03:00
|
|
|
name: Crowdin Sync
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
inputs: {}
|
2021-11-05 20:59:15 +03:00
|
|
|
schedule:
|
|
|
|
- cron: '0 0 * * 5'
|
2021-08-13 17:31:36 +03:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
crowdin-sync:
|
|
|
|
name: Autosync
|
|
|
|
runs-on: ubuntu-20.04
|
2021-09-02 23:04:41 +03:00
|
|
|
env:
|
2021-08-27 20:08:40 +03:00
|
|
|
_CROWDIN_PROJECT_ID: "269690"
|
2021-08-13 17:31:36 +03:00
|
|
|
steps:
|
|
|
|
- name: Checkout repo
|
2023-05-06 03:22:58 +03:00
|
|
|
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
|
2021-08-13 17:31:36 +03:00
|
|
|
|
2023-04-18 13:48:05 +03:00
|
|
|
- name: Login to Azure - CI Subscription
|
2023-05-06 03:22:58 +03:00
|
|
|
uses: Azure/login@1f63701bf3e6892515f1b7ce2d2bf1708b46beaf # v1.4.3
|
2021-08-13 23:28:07 +03:00
|
|
|
with:
|
2023-04-11 18:18:59 +03:00
|
|
|
creds: ${{ secrets.AZURE_KV_CI_SERVICE_PRINCIPAL }}
|
2021-08-13 23:28:07 +03:00
|
|
|
|
|
|
|
- name: Retrieve secrets
|
|
|
|
id: retrieve-secrets
|
2023-05-06 03:22:58 +03:00
|
|
|
uses: bitwarden/gh-actions/get-keyvault-secrets@34ecb67b2a357795dc893549df0795e7383ff50f
|
2022-10-17 18:19:06 +03:00
|
|
|
with:
|
2023-04-11 18:18:59 +03:00
|
|
|
keyvault: "bitwarden-ci"
|
2022-10-17 18:19:06 +03:00
|
|
|
secrets: "crowdin-api-token, github-gpg-private-key, github-gpg-private-key-passphrase"
|
2021-08-13 23:28:07 +03:00
|
|
|
|
2021-08-27 20:08:40 +03:00
|
|
|
- name: Download translations
|
2023-06-13 17:57:02 +03:00
|
|
|
uses: crowdin/github-action@965d501f160af7b1f88aed4c29154b0caf1e94b9 # v1.9.0
|
2021-08-13 23:28:07 +03:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2021-08-27 20:08:40 +03:00
|
|
|
CROWDIN_API_TOKEN: ${{ steps.retrieve-secrets.outputs.crowdin-api-token }}
|
|
|
|
with:
|
|
|
|
config: crowdin.yml
|
|
|
|
crowdin_branch_name: master
|
|
|
|
upload_sources: false
|
|
|
|
upload_translations: false
|
|
|
|
download_translations: true
|
2022-10-17 18:19:06 +03:00
|
|
|
github_user_name: "bitwarden-devops-bot"
|
|
|
|
github_user_email: "106330231+bitwarden-devops-bot@users.noreply.github.com"
|
2021-08-27 20:08:40 +03: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 18:19:06 +03:00
|
|
|
gpg_private_key: ${{ steps.retrieve-secrets.outputs.github-gpg-private-key }}
|
2023-04-11 18:18:59 +03:00
|
|
|
gpg_passphrase: ${{ steps.retrieve-secrets.outputs.github-gpg-private-key-passphrase }}
|