1
- name : " Create Language Translation PR "
2
- description : " Create a translation PR for a Scientific Python Project "
1
+ name : " clean-up "
2
+ description : " Create clean up actions on translation repositories "
3
3
author : " @goanpeca"
4
4
inputs :
5
- source-repo :
6
- description : " Source repository"
7
- required : true
8
- source-path :
9
- description : " Source folder"
10
- required : true
11
- source-ref :
12
- description : " Source reference"
13
- default : " main"
14
5
translations-repo :
15
6
description : " Translations repository"
16
7
required : true
17
- translations-path :
18
- description : " This is the folder in the translations repo where all the content will be copied to."
19
- required : true
20
- translations-source-path :
21
- description : " This is the folder in the translations repo where all the content will be copied to."
22
- required : true
23
8
translations-ref :
24
9
description : " Translations reference"
25
10
default : " main"
26
- translation-percentage :
27
- description : " Minimum value of language translation to create a PR e.g. '98'"
28
- required : true
29
- approval-percentage :
30
- description : " Minimum value of language approval to create a PR e.g. '95'"
31
- required : true
32
- use-precommit :
33
- description : " Apply pre-commit before submitting the final PR upstream. Default is 'false'."
34
- default : " false"
35
- create-toml-file :
36
- description : " Create toml file with translators information."
37
- default : " false"
38
- create-upstream-pr :
39
- description : " "
40
- default : " false"
41
- auto-merge :
42
- description : " "
43
- default : " false"
44
11
gpg-private-key :
45
12
description : " GPG private key of the user/email making the commits"
46
13
required : true
@@ -50,12 +17,6 @@ inputs:
50
17
token :
51
18
description : " Github personal access token of the account performing the github operations"
52
19
required : true
53
- crowdin-token :
54
- description : " Crowdin personal access token of the account performing the github operations"
55
- required : true
56
- crowdin-project :
57
- description : " Name of the associated crowdin project. This is used to fetch the latest translators from crowdin. This is case sensitive."
58
- required : true
59
20
runs :
60
21
using : " composite"
61
22
steps :
@@ -83,25 +44,11 @@ runs:
83
44
- name : Run scripts
84
45
shell : bash
85
46
env :
86
- INPUT_SOURCE-REPO : ${{ inputs.SOURCE-REPO }}
87
- INPUT_SOURCE-PATH : ${{ inputs.SOURCE-PATH }}
88
- INPUT_SOURCE-REF : ${{ inputs.SOURCE-REF }}
89
47
INPUT_TRANSLATIONS-REPO : ${{ inputs.TRANSLATIONS-REPO }}
90
- INPUT_TRANSLATIONS-PATH : ${{ inputs.TRANSLATIONS-PATH }}
91
- INPUT_TRANSLATIONS-SOURCE-PATH : ${{ inputs.TRANSLATIONS-SOURCE-PATH }}
92
48
INPUT_TRANSLATIONS-REF : ${{ inputs.TRANSLATIONS-REF }}
93
- INPUT_CROWDIN-PROJECT : ${{ inputs.CROWDIN-PROJECT }}
94
- INPUT_APPROVAL-PERCENTAGE : ${{ inputs.APPROVAL-PERCENTAGE }}
95
- INPUT_TRANSLATION-PERCENTAGE : ${{ inputs.TRANSLATION-PERCENTAGE }}
96
- INPUT_USE-PRECOMMIT : ${{ inputs.USE-PRECOMMIT }}
97
- INPUT_CREATE-TOML-FILE : ${{ inputs.CREATE-TOML-FILE }}
98
- INPUT_CREATE-UPSTREAM-PR : ${{ inputs.CREATE-UPSTREAM-PR }}
99
- INPUT_AUTO-MERGE : ${{ inputs.AUTO-MERGE }}
100
49
GPG_NAME : ${{ steps.import-gpg.outputs.name }}
101
50
GPG_EMAIL : ${{ steps.import-gpg.outputs.email }}
102
51
TOKEN : ${{ inputs.TOKEN }}
103
- CROWDIN_TOKEN : ${{ inputs.CROWDIN-TOKEN }}
104
- CROWDIN_PROJECT : ${{ inputs.CROWDIN-PROJECT }}
105
52
run : |
106
53
python -m pip install --upgrade pip
107
54
python -m pip install crowdin-api-client python-dotenv pre-commit pygithub requests
0 commit comments