Skip to content

Commit 57d7b89

Browse files
committed
workflow: add crowdin workflow
1 parent 490a1f7 commit 57d7b89

2 files changed

Lines changed: 61 additions & 0 deletions

File tree

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Crowdin Action
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
synchronize-with-crowdin:
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v4
13+
14+
- name: crowdin action
15+
uses: crowdin/github-action@v2
16+
with:
17+
upload_sources: false
18+
upload_translations: false
19+
download_translations: true
20+
localization_branch_name: l10n_crowdin_translations
21+
create_pull_request: true
22+
pull_request_title: 'New Crowdin Translations'
23+
pull_request_body: 'New Crowdin translations by [Crowdin GH Action](https://github.com/crowdin/github-action)'
24+
pull_request_base_branch_name: 'webui'
25+
env:
26+
# A classic GitHub Personal Access Token with the 'repo' scope selected (the user should have write access to the repository).
27+
GITHUB_TOKEN: ${{ secrets.SUSFS4KSU_SECRET }}
28+
29+
# A numeric ID, found at https://crowdin.com/project/<projectName>/tools/api
30+
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
31+
32+
# Visit https://crowdin.com/settings#api-key to create this token
33+
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Crowdin Action
2+
3+
on:
4+
push:
5+
paths:
6+
- 'languages/**'
7+
branches: [ webui ]
8+
9+
jobs:
10+
synchronize-with-crowdin:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
17+
- name: crowdin action
18+
uses: crowdin/github-action@v2
19+
with:
20+
upload_sources: true
21+
upload_translations: true
22+
download_translations: false
23+
env:
24+
# A numeric ID, found at https://crowdin.com/project/<projectName>/tools/api
25+
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
26+
27+
# Visit https://crowdin.com/settings#api-key to create this token
28+
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}

0 commit comments

Comments
 (0)