-
Notifications
You must be signed in to change notification settings - Fork 561
77 lines (71 loc) · 2.37 KB
/
Copy pathcrowdin-sync.yml
File metadata and controls
77 lines (71 loc) · 2.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: Crowdin Sync
on:
workflow_dispatch:
schedule:
- cron: "17 */6 * * *"
push:
branches:
- main
- r-dev
paths:
- "crowdin.yml"
- "locales/zh-CN/*.json"
- "prompts/zh-CN/**/*.prompt"
- "dashboard/src/i18n/locales/zh.json"
permissions:
contents: write
pull-requests: write
jobs:
sync-current-branch:
if: github.event_name != 'schedule'
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Sync translations with Crowdin
uses: crowdin/github-action@v2
with:
config: crowdin.yml
upload_sources: true
upload_translations: false
download_translations: true
localization_branch_name: l10n_${{ github.ref_name }}
create_pull_request: true
pull_request_title: "chore(i18n): sync Crowdin translations"
pull_request_body: "Automated translation sync from Crowdin."
pull_request_base_branch_name: ${{ github.ref_name }}
commit_message: "chore(i18n): sync Crowdin translations"
env:
GITHUB_TOKEN: ${{ github.token }}
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
sync-scheduled-branches:
if: github.event_name == 'schedule'
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
base_branch:
- main
- r-dev
steps:
- uses: actions/checkout@v4
with:
ref: ${{ matrix.base_branch }}
- name: Sync scheduled translations with Crowdin
uses: crowdin/github-action@v2
with:
config: crowdin.yml
skip_ref_checkout: true
upload_sources: true
upload_translations: false
download_translations: true
localization_branch_name: l10n_${{ matrix.base_branch }}
create_pull_request: true
pull_request_title: "chore(i18n): sync Crowdin translations"
pull_request_body: "Automated translation sync from Crowdin."
pull_request_base_branch_name: ${{ matrix.base_branch }}
commit_message: "chore(i18n): sync Crowdin translations"
env:
GITHUB_TOKEN: ${{ github.token }}
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}