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 "
33author : " @goanpeca"
44inputs :
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"
145 translations-repo :
156 description : " Translations repository"
167 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
238 translations-ref :
249 description : " Translations reference"
2510 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"
4411 gpg-private-key :
4512 description : " GPG private key of the user/email making the commits"
4613 required : true
@@ -50,12 +17,6 @@ inputs:
5017 token :
5118 description : " Github personal access token of the account performing the github operations"
5219 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
5920runs :
6021 using : " composite"
6122 steps :
@@ -83,25 +44,11 @@ runs:
8344 - name : Run scripts
8445 shell : bash
8546 env :
86- INPUT_SOURCE-REPO : ${{ inputs.SOURCE-REPO }}
87- INPUT_SOURCE-PATH : ${{ inputs.SOURCE-PATH }}
88- INPUT_SOURCE-REF : ${{ inputs.SOURCE-REF }}
8947 INPUT_TRANSLATIONS-REPO : ${{ inputs.TRANSLATIONS-REPO }}
90- INPUT_TRANSLATIONS-PATH : ${{ inputs.TRANSLATIONS-PATH }}
91- INPUT_TRANSLATIONS-SOURCE-PATH : ${{ inputs.TRANSLATIONS-SOURCE-PATH }}
9248 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 }}
10049 GPG_NAME : ${{ steps.import-gpg.outputs.name }}
10150 GPG_EMAIL : ${{ steps.import-gpg.outputs.email }}
10251 TOKEN : ${{ inputs.TOKEN }}
103- CROWDIN_TOKEN : ${{ inputs.CROWDIN-TOKEN }}
104- CROWDIN_PROJECT : ${{ inputs.CROWDIN-PROJECT }}
10552 run : |
10653 python -m pip install --upgrade pip
10754 python -m pip install crowdin-api-client python-dotenv pre-commit pygithub requests
0 commit comments