2024-03-04 05:31:27 +00:00
|
|
|
name: "Sync crowdin translations (web)"
|
2023-03-21 13:34:51 +00:00
|
|
|
|
|
|
|
on:
|
2024-02-22 06:27:55 +00:00
|
|
|
push:
|
2024-03-04 05:31:27 +00:00
|
|
|
# Run action when web's en-US/translation.json file is changed
|
|
|
|
paths:
|
|
|
|
- "web/apps/photos/public/locales/en-US/translation.json"
|
2024-02-22 06:27:55 +00:00
|
|
|
branches: [main]
|
|
|
|
schedule:
|
2024-03-04 05:31:27 +00:00
|
|
|
# Run every 24 hours - https://crontab.guru/#0_*/12_*_*_*
|
|
|
|
- cron: "0 */24 * * *"
|
|
|
|
workflow_dispatch: # For manually running the action
|
2023-03-21 13:34:51 +00:00
|
|
|
|
|
|
|
jobs:
|
2024-02-22 06:27:55 +00:00
|
|
|
synchronize-with-crowdin:
|
|
|
|
runs-on: ubuntu-latest
|
2023-03-21 13:34:51 +00:00
|
|
|
|
2024-02-22 06:27:55 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2024-03-04 05:31:27 +00:00
|
|
|
uses: actions/checkout@v4
|
2023-03-21 13:34:51 +00:00
|
|
|
|
2024-03-04 05:31:27 +00:00
|
|
|
- name: Crowdin's action
|
2024-02-22 06:27:55 +00:00
|
|
|
uses: crowdin/github-action@v1
|
|
|
|
with:
|
|
|
|
upload_sources: true
|
|
|
|
upload_translations: true
|
|
|
|
download_translations: true
|
2024-03-04 05:31:27 +00:00
|
|
|
localization_branch_name: crowdin-translations-web
|
2024-02-22 06:27:55 +00:00
|
|
|
create_pull_request: true
|
|
|
|
skip_untranslated_strings: true
|
|
|
|
pull_request_title: "New Translations"
|
|
|
|
pull_request_body: "New translations via [Crowdin GH Action](https://github.com/crowdin/github-action)"
|
|
|
|
pull_request_base_branch_name: "main"
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2024-03-04 05:31:27 +00:00
|
|
|
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID_WEB }}
|
2024-02-22 06:27:55 +00:00
|
|
|
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
|