12345678910111213141516171819202122232425262728293031323334353637383940 |
- name: Update translations
- on:
- push:
- branches: [ translations ]
- jobs:
- pull-request:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v2
- - name: Update Widgets
- run: |
- sudo apt-get install inkscape
- for language in i18n/*.json
- do
- language=$(basename $language .json)
- if [[ "$language" =~ [^[:lower:]-] ]]
- then
- echo "$language" is not a translation
- else
- wget https://weblate.frisk.space/widgets/wiki-bot/$language/discord/svg-badge.svg
- convert -background none svg-badge.svg i18n/widgets/$language.png
- rm svg-badge.svg
- fi
- done
- - name: Commit changes
- uses: EndBug/add-and-commit@v4
- with:
- author_name: WikiBot-bot
- author_email: 69196528+WikiBot-bot@users.noreply.github.com
- message: "Update translation widgets"
- add: "i18n/widgets/*.png"
- env:
- GITHUB_TOKEN: ${{ secrets.WIKIBOT_TOKEN }}
- - name: Create Pull Request
- uses: repo-sync/pull-request@v2
- with:
- pr_title: "Update translations"
- pr_body: "Update translations from https://weblate.frisk.space/engage/wiki-bot/"
- pr_label: "translation"
- github_token: ${{ secrets.WIKIBOT_TOKEN }}
|