2020-12-30 10:06:51 +00:00
|
|
|
name: Sync localisations from Crowdin
|
|
|
|
on:
|
2022-01-09 08:23:38 +00:00
|
|
|
workflow_dispatch:
|
2020-12-30 10:06:51 +00:00
|
|
|
schedule:
|
2022-08-30 16:38:46 +00:00
|
|
|
- cron: '0 0 * * 0'
|
2020-12-30 10:06:51 +00:00
|
|
|
|
|
|
|
jobs:
|
2021-05-02 01:05:17 +00:00
|
|
|
sync-crowdin:
|
2020-12-30 10:06:51 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-04-13 09:15:08 +00:00
|
|
|
- name: Setup build environment
|
|
|
|
uses: android-password-store/android-password-store/.github/reusable-workflows/setup-gradle@develop
|
2021-03-18 07:03:44 +00:00
|
|
|
|
2024-08-18 08:10:12 +00:00
|
|
|
- name: Sync translations to/from Crowdin
|
|
|
|
id: crowdin
|
2024-09-23 17:28:21 +00:00
|
|
|
uses: crowdin/github-action@95d6e895e871c3c7acf0cfb962f296baa41e63c6 # v2
|
2020-12-30 10:06:51 +00:00
|
|
|
with:
|
2024-08-18 08:10:12 +00:00
|
|
|
upload_sources: true
|
|
|
|
upload_translations: false
|
|
|
|
download_translations: true
|
|
|
|
localization_branch_name: l10n_crowdin_translations
|
|
|
|
create_pull_request: true
|
|
|
|
pull_request_title: 'New Crowdin Translations'
|
|
|
|
pull_request_body: 'New Crowdin translations by [Crowdin GH Action](https://github.com/crowdin/github-action)'
|
|
|
|
pull_request_base_branch_name: 'develop'
|
2024-08-18 08:43:05 +00:00
|
|
|
project_id: ${{ secrets.CROWDIN_PROJECT_ID }}
|
|
|
|
token: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
|
2024-08-18 08:10:12 +00:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.PSL_UPDATE_TOKEN }}
|
2022-08-30 16:38:46 +00:00
|
|
|
|
2022-09-05 08:11:19 +00:00
|
|
|
- name: Enable automerge for PR
|
2022-08-30 16:38:46 +00:00
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
gh pr merge --squash --auto "${PR_URL}"
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.PSL_UPDATE_TOKEN }}
|
2024-08-18 08:10:12 +00:00
|
|
|
PR_URL: ${{ steps.crowdin.outputs.pull-request-url }}
|