2020 PYDOC_LANGUAGE : pt_BR
2121 PYDOC_TX_PROJECT : ${{ inputs.tx_project }}
2222 PYDOC_VERSION : ${{ inputs.version }}
23+ PYDOC_LANG_DIR : ${{ inputs.version }}
2324 TX_CLI_VERSION : ' 1.6.17'
2425
2526jobs :
2627 sync :
2728 runs-on : ubuntu-latest
29+ permissions :
30+ contents : read
2831 steps :
2932
3033 # 1- Set up environment
3134
3235 - name : Check out this repository
3336 uses : actions/checkout@v6
3437
35- - name : Set language dir variable
36- run :
37- echo "PYDOC_LANG_DIR=${{ env.PYDOC_VERSION }}" >> $GITHUB_ENV
38-
3938 - name : Checkout this repository ${{ env.PYDOC_VERSION }}
4039 uses : actions/checkout@v6
4140 with :
@@ -107,7 +106,37 @@ jobs:
107106 env :
108107 PYDOC_LANG_DIR : ${{ env.PYDOC_LANG_DIR }}
109108
110- # 4- Commit and push translations
109+ - name : Upload translation artifacts
110+ uses : actions/upload-artifact@v7
111+ with :
112+ name : python-${{ env.PYDOC_VERSION }}
113+ path : |
114+ .tx/config
115+ potodo.md
116+ stats.json
117+ *.po
118+ **/*.po
119+
120+ commit :
121+ runs-on : ubuntu-latest
122+ permissions :
123+ contents : write
124+ steps :
125+
126+ - name : Check out this repository
127+ uses : actions/checkout@v6
128+
129+ - name : Checkout this repository ${{ env.PYDOC_VERSION }}
130+ uses : actions/checkout@v6
131+ with :
132+ ref : ${{ env.PYDOC_VERSION }}
133+ path : ${{ env.PYDOC_LANG_DIR }}
134+
135+ - name : Download translation artifacts
136+ uses : actions/download-artifact@v8
137+ with :
138+ name : python-${{ env.PYDOC_VERSION }}
139+ path : ${{ env.PYDOC_LANG_DIR }}
111140
112141 - name : Commit
113142 run : ./scripts/commit.sh
@@ -119,5 +148,3 @@ jobs:
119148 run : |
120149 cd ./${{ env.PYDOC_LANG_DIR }}
121150 git push
122-
123-
0 commit comments