File tree Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Create Translations PR
2
+
3
+ on :
4
+ workflow_dispatch :
5
+ inputs :
6
+ language_code :
7
+ description : ' Crowdin language code for the language of interest'
8
+ required : true
9
+
10
+ jobs :
11
+ auto-translation-pr :
12
+ runs-on : ubuntu-latest
13
+ # Run only on main branch in upstream repo.
14
+ if : ${{ github.repository == 'steppi/numpy.org' && github.ref == 'refs/heads/auto-translation-pr' }}
15
+ steps :
16
+ - name : Checkout numpy.org
17
+ uses : actions/checkout@v4
18
+ with :
19
+ repository : ' numpy/numpy.org'
20
+ path : ' numpy.org'
21
+ ref : ' main'
22
+
23
+ - name : Checkout scientific-python-translations automations
24
+ uses : actions/checkout@v4
25
+ with :
26
+ repository : ' steppi/automations'
27
+ path : ' automations'
28
+ ref : ' filter_commits'
29
+
30
+ - name : Create translations branch for language of interest
31
+ env :
32
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
33
+ run : |
34
+ cd numpy.org
35
+ ../automations/scripts/create_branch_for_language.sh numpy main l10n_main ${{ github.event.inputs.language_code }}
36
+ working-directory : ./numpy.org
37
+
38
+ - name : Create Pull Request
39
+ if : env.CONTENT_CHANGED == 'true'
40
+ env :
41
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
42
+ run :
43
+ gh pr create --base main --head ${{ env.BRANCH_NAME }} --title "Update translations for X" --body "Body goes here."
44
+ working-directory : ./numpy.org
You can’t perform that action at this time.
0 commit comments