2020-12-30 10:06:51 +00:00
|
|
|
name: Sync localisations from Crowdin
|
|
|
|
on:
|
|
|
|
schedule:
|
|
|
|
- cron: '0 0 * * 6'
|
|
|
|
|
|
|
|
jobs:
|
2021-05-02 01:05:17 +00:00
|
|
|
sync-crowdin:
|
2020-12-30 10:06:51 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2021-12-06 18:19:29 +00:00
|
|
|
uses: actions/checkout@v2.4.0
|
2020-12-30 10:06:51 +00:00
|
|
|
|
2021-12-06 18:19:29 +00:00
|
|
|
- name: Set up JDK
|
|
|
|
uses : actions/setup-java@v2.4.0
|
|
|
|
with :
|
|
|
|
distribution : 'zulu'
|
2021-12-07 15:21:54 +00:00
|
|
|
java-version : '17'
|
2021-12-06 18:19:29 +00:00
|
|
|
cache: 'gradle'
|
2021-03-18 07:03:44 +00:00
|
|
|
|
2020-12-30 10:06:51 +00:00
|
|
|
- name: Download new translations from Crowdin
|
|
|
|
run: ./gradlew crowdin
|
2021-05-22 15:04:53 +00:00
|
|
|
env:
|
|
|
|
CROWDIN_LOGIN: ${{ secrets.CROWDIN_LOGIN }}
|
|
|
|
CROWDIN_PROJECT_KEY: ${{ secrets.CROWDIN_PROJECT_KEY }}
|
|
|
|
CROWDIN_PROJECT_IDENTIFIER: ${{ secrets.CROWDIN_PROJECT_IDENTIFIER }}
|
2020-12-30 10:06:51 +00:00
|
|
|
|
|
|
|
- name: Compare list changes
|
|
|
|
run: if [[ $(git diff --stat) != '' ]]; then echo "UPDATED=true" >> $GITHUB_ENV; fi
|
|
|
|
|
|
|
|
- name: Create Pull Request
|
2021-12-23 12:32:30 +00:00
|
|
|
uses: peter-evans/create-pull-request@v3.12.0
|
2020-12-30 10:06:51 +00:00
|
|
|
if: env.UPDATED == 'true'
|
|
|
|
with:
|
|
|
|
assignees: msfjarvis
|
|
|
|
author: GitHub Actions <noreply@github.com>
|
|
|
|
base: develop
|
|
|
|
body: This is an automated pull request to sync localisations from Crowdin.
|
|
|
|
branch: bot/crowdin-sync
|
|
|
|
commit-message: "strings: sync with crowdin"
|
|
|
|
labels: A-localisation, P-low, S-waiting-on-review
|
|
|
|
title: Sync localisations from Crowdin
|
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|