Skip to content

Commit

Permalink
Add Crowdin download workflow template
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverviljamaa authored Sep 24, 2021
1 parent 9f023f4 commit 36399ea
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions workflow-templates/crowdin-download.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Crowdin download

on:
schedule:
- cron: '*/15 * * * *'
workflow_dispatch:
push:
branches-ignore:
- 'dependabot/**'
- 'dependabot-**'

jobs:
download-from-crowdin:
runs-on: [self-hosted, production]
container: docker.tw.ee/actions_java15

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Get branch name
id: vars
run: echo ::set-output name=branch_name::${GITHUB_REF##*/}

- name: crowdin action
uses: crowdin/[email protected]
with:
upload_translations: false
download_translations: true
localization_branch_name: l10n_${{ steps.vars.outputs.branch_name }}
create_pull_request: true
pull_request_title: 'New or updated Crowdin translations'
pull_request_body: '## Context
Automated pull request pulling in new or updated translations from Crowdin
## Checklist
- [x] I have considered the impact of this change and added a [Change Classification](https://transferwise.atlassian.net/wiki/spaces/EKB/pages/1401189673/Change+Classifications+and+Expectations) Label (`change:standard`, `change:impactful`, `change:emergency`)
- [x] Change meets or does not compromise the [Baseline Security Requirements](https://transferwise.atlassian.net/wiki/spaces/EKB/pages/434929973/Baseline+Security+Requirements)'
pull_request_labels: 'change:standard'
pull_request_base_branch_name: ${{ steps.vars.outputs.branch_name }}

# signing commits
gpg_private_key: ${{ secrets.GPG_SIGN_KEY }}
github_user_email: '[email protected]'

# integration settings
base_url: 'https://transferwise.crowdin.com'
crowdin_branch_name: ${{ steps.vars.outputs.branch_name }}
token: ${{ secrets.CROWDIN_ENTERPRISE_TOKEN }}
project_id: ${{ secrets.CROWDIN_PROJECT_ID }} # Add as repository secret — number from transferwise.crowdin.com project URL

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 36399ea

Please sign in to comment.