ente/.github/workflows/web-crowdin.yml

49 lines
1.8 KiB
YAML
Raw Normal View History

2024-03-04 06:05:42 +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:
branches: [main]
paths:
2024-03-08 08:29:54 +00:00
# Run workflow when web's en-US/translation.json is changed
2024-04-06 06:00:31 +00:00
- "web/packages/next/locales/en-US/translation.json"
2024-03-04 10:52:44 +00:00
# Or the workflow itself is changed
- ".github/workflows/web-crowdin.yml"
2024-02-22 06:27:55 +00:00
schedule:
# [Note: Run workflow on specific days of the week]
#
# The last (5th) component of the cron syntax denotes the day of the
# week, with 0 == SUN and 6 == SAT. So, for example, to run on every TUE
# and FRI, this can be set to `2,5`.
#
# See also: [Note: Run workflow every 24 hours]
- cron: "20 1 * * 2,5"
2024-03-08 08:29:54 +00:00
# Also allow manually running the workflow
workflow_dispatch:
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
uses: actions/checkout@v4
2023-03-21 13:34:51 +00:00
- name: Crowdin's action
2024-02-22 06:27:55 +00:00
uses: crowdin/github-action@v1
with:
base_path: "web/"
2024-03-04 10:52:44 +00:00
config: "web/crowdin.yml"
2024-02-22 06:27:55 +00:00
upload_sources: true
upload_translations: false
2024-02-22 06:27:55 +00:00
download_translations: true
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: "[web] New translations"
pull_request_body: "New translations from [Crowdin](https://crowdin.com/project/ente-photos-web)"
2024-02-22 06:27:55 +00:00
pull_request_base_branch_name: "main"
project_id: 569613
2024-02-22 06:27:55 +00:00
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}