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
|
2024-01-24 18:07:10 +03:00
|
|
|
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
|
2021-08-13 17:31:36 +03:00
|
|
|
|
2023-04-18 13:48:05 +03:00
|
|
|
- name: Login to Azure - CI Subscription
|
2024-01-24 18:07:10 +03:00
|
|
|
uses: Azure/login@e15b166166a8746d1a47596803bd8c1b595455cf # v1.6.0
|
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-11-09 18:18:34 +03:00
|
|
|
uses: bitwarden/gh-actions/get-keyvault-secrets@main
|
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
|
2024-02-12 22:09:14 +03:00
|
|
|
uses: crowdin/github-action@198daeb2d30636c4608d6a6bb96c009dbefc02a2 # v1.18.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
|
2023-12-12 22:12:27 +03:00
|
|
|
crowdin_branch_name: main
|
2021-08-27 20:08:40 +03:00
|
|
|
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 }}
|