You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
56 lines
1.7 KiB
56 lines
1.7 KiB
--- |
|
name: crowdin Pull |
|
|
|
on: |
|
workflow_dispatch: |
|
inputs: {} |
|
schedule: |
|
- cron: "0 0 * * 5" |
|
|
|
jobs: |
|
crowdin-pull: |
|
name: Pull |
|
runs-on: ubuntu-20.04 |
|
env: |
|
_CROWDIN_PROJECT_ID: "308189" |
|
steps: |
|
- name: Checkout repo |
|
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v2.3.4 |
|
|
|
- name: Login to Azure |
|
uses: Azure/logi@77f1b2e3fb80c0e8645114159d17008b8a2e475a |
|
with: |
|
creds: ${{ secrets.AZURE_PROD_KV_CREDENTIALS }} |
|
|
|
- name: Retrieve secrets |
|
id: retrieve-secrets |
|
env: |
|
KEYVAULT: bitwarden-prod-kv |
|
SECRETS: | |
|
crowdin-api-token |
|
run: | |
|
for i in ${SECRETS//,/ } |
|
do |
|
VALUE=$(az keyvault secret show --vault-name $KEYVAULT --name $i --query value --output tsv) |
|
echo "::add-mask::$VALUE" |
|
echo "::set-output name=$i::$VALUE" |
|
done |
|
|
|
- name: Download translations |
|
uses: crowdin/github-action@e39093fd75daae7859c68eded4b43d42ec78d8ea # v1.3.2 |
|
env: |
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
|
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 |
|
github_user_name: "github-actions" |
|
github_user_email: "<>" |
|
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" |