@@ -6,7 +6,7 @@ name: Check for Crowdin Updates
66
77on :
88 schedule :
9- - cron : ' 0 0 * * 1' # Every Monday at 12:00 AM UTC, which is 10:00 AM Melbourne time (AEST)
9+ - cron : ' 0 0 * * 1' # Every Monday at 12:00 AM UTC, which is 10:00 AM Melbourne time (AEST)
1010 workflow_dispatch :
1111 inputs :
1212 UPDATE_PULL_REQUESTS :
3131 This PR includes the latest translations from Crowdin
3232
3333 Session uses the community-driven translation platform Crowdin for localization, anyone can contribute at https://getsession.org/translate
34- PR_TARGET_BRANCH : feature/update-crowdin-translations
3534
3635jobs :
37-
3836 fetch_translations :
3937 name : Download translations from crowdin
4038 runs-on : ubuntu-latest
@@ -167,8 +165,6 @@ jobs:
167165 if-no-files-found : warn
168166 retention-days : 7
169167
170-
171-
172168 build_localization_module :
173169 name : Build localization module strings
174170 needs : [parse_translations]
@@ -272,7 +268,6 @@ jobs:
272268 -x lint \
273269 -x test
274270
275-
276271 jobs_sync :
277272 name : Waiting for build jobs
278273
@@ -285,6 +280,9 @@ jobs:
285280 run : echo "Nothing to do here"
286281
287282 make_android_pr :
283+ env :
284+ PR_TARGET_BRANCH : feature/update-crowdin-translations
285+
288286 name : Make Android PR
289287 needs : [jobs_sync]
290288 runs-on : ubuntu-latest
@@ -316,6 +314,8 @@ jobs:
316314 delete-branch : true
317315
318316 make_localization_module_pr :
317+ env :
318+ PR_TARGET_BRANCH : main
319319 needs : [jobs_sync]
320320 name : Make Localization Module PR
321321 runs-on : ubuntu-latest
@@ -328,26 +328,28 @@ jobs:
328328 # don't provide a branch (ref) so it uses the default for that event
329329 - name : Checkout Localization Module
330330 uses : ./scripts/actions/checkout_localization_module
331+ with :
332+ token : ${{ secrets.CROWDIN_PR_TOKEN }}
331333
332334 - uses : actions/download-artifact@v4
333335 with :
334336 name : session-localization
335337 # Download to /generated folder in localization module repo
336338 path : " ${{ github.workspace }}/module/generated"
337339
338- - name : Create Localization Module Pull Request
339- uses : peter-evans/create-pull-request@v6
340+ - name : Push directly to ${{ env.PR_TARGET_BRANCH }}
341+ uses : stefanzweifel/git-auto-commit-action@v5
340342 with :
341- path : ' module'
342- token : ${{ secrets.CROWDIN_PR_TOKEN }}
343- title : ${{ env.PR_TITLE }}
344- body : ${{ env.PR_DESCRIPTION }}
343+ repository : module
344+ commit_message : ${{ env.PR_TITLE }}
345345 branch : ${{ env.PR_TARGET_BRANCH }}
346- commit-message : ${{ env.PR_TITLE }}
347- delete-branch : true
348-
346+ commit_author : " github-actions[bot] <github-actions[bot]@users.noreply.github.com> "
347+ commit_user_name : github-actions[bot]
348+ commit_user_email : github-actions[bot]@users.noreply.github.com
349349
350350 make_ios_pr :
351+ env :
352+ PR_TARGET_BRANCH : feature/update-crowdin-translations
351353 needs : [jobs_sync]
352354 name : Make iOS PR
353355 runs-on : ubuntu-latest
@@ -370,11 +372,10 @@ jobs:
370372 - name : Create iOS Pull Request
371373 uses : peter-evans/create-pull-request@v6
372374 with :
373- path : ' ios'
375+ path : " ios"
374376 token : ${{ secrets.CROWDIN_PR_TOKEN }}
375377 title : ${{ env.PR_TITLE }}
376378 body : ${{ env.PR_DESCRIPTION }}
377379 branch : ${{ env.PR_TARGET_BRANCH }}
378380 commit-message : ${{ env.PR_TITLE }}
379381 delete-branch : true
380-
0 commit comments