Merge pull request #25820 from hribz/master
[xbmc.git] / .github / workflows / gh-action-weblate-upload.yml
blob05b8e34038220c9e62664e1afe3570b108ea239a
1 # This GitHub action updates the translation (msgmrge) based on the changed source language file
3 name: Update Weblate translations
5 on:
6   push:
7     branches:
8       - master
9     paths:
10       - "addons/resource.language.en_gb/resources/strings.po"
11       - ".github/workflows/gh-action-weblate-upload.yml"
12 permissions:
13   contents: read
15 jobs:
16   weblate:
17     if: github.repository == 'xbmc/xbmc'
18     runs-on: ubuntu-latest
19     steps:
20       - name: Checkout
21         uses: actions/checkout@v2.3.2
22         with:
23           fetch-depth: 0
24       - name: Update Weblate
25         env:
26           TOKEN: "${{ secrets.WEBLATE_TOKEN }}"
27         run: | 
28           curl \
29             --form file=@addons/resource.language.en_gb/resources/strings.po \
30             --form method=source \
31             -H "Authorization: Token $TOKEN" \
32             https://kodi.weblate.cloud/api/translations/kodi-core/kodi-main/en_gb/file/