forked from twrdjpalmer/.github
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Crowdin download workflow template
- Loading branch information
1 parent
9f023f4
commit 36399ea
Showing
1 changed file
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |