This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (65 loc) · 2.34 KB
/
crowdin.yml
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 Action
on:
schedule:
- cron: "0 * * * *"
push:
branches: [ main ]
paths:
- "Fabric/**"
- "Forge/**"
workflow_dispatch: {}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
synchronize-with-crowdin:
runs-on: ubuntu-latest
outputs:
branch_status: ${{ steps.branch.outputs.EXISTED_STATUS }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: crowdin action
uses: Docker-Collection/docker-crowdin-action@main
with:
upload_sources: true
upload_translations: true
download_translations: true
skip_untranslated_strings: true
localization_branch_name: crowdin_translations
create_pull_request: true
pull_request_title: "新的 Crowdin 翻譯"
pull_request_body: "透過 [Crowdin GH Action](https://github.com/crowdin/github-action) 的 Crowdin 翻譯"
pull_request_base_branch_name: "main"
commit_message: "trans(Crowdin): 新的翻譯上傳"
source: "*/*/*/lang/en_us.json"
translation: "/%original_path%/%locale_with_underscore%.%file_extension%"
project_id: ${{ secrets.CROWDIN_PROJECT_ID }}
token: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
github_user_name: EfinaBot
github_user_email: [email protected]
env:
GITHUB_TOKEN: ${{ secrets.GH_EFINABOT }}
# - name: Branch checker
# id: branch
# run: .github/scripts/check_git_branch_exists.sh crowdin_translations
# json-fixer:
# needs: [ "synchronize-with-crowdin" ]
# if: needs.synchronize-with-crowdin.outputs.branch_status == 'true'
# runs-on: [ self-hosted, lowend ]
# steps:
# - name: Checkout
# uses: actions/checkout@v3
# with:
# ref: "crowdin_translations"
# - name: Init command
# run: .github/scripts/command_init.sh
# - name: Run script
# run: .github/scripts/auto_fixer.sh
# - name: Add and Commit
# uses: EndBug/add-and-commit@v9
# with:
# author_name: "EfinaBot"
# author_email: [email protected]
# message: "ci(JsonFixer): 修正翻譯語言檔"
# github_token: ${{ secrets.GH_EFINABOT }}